Empty page fires mousemove consuming CPU resources
Reported by
fabian.z...@gmail.com,
Aug 17 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. Create blank file, call it "empty.html" 2. Open in Chrome 3. Open Chrome TaskManager 4. Fiddle around with mouse on empty page What is the expected behavior? CPU usage of Tab should stay at 0. What went wrong? CPU usage during mousemove climbs to 1-5%, because of firing "Hit-Test", rerendering and mousemove-Events Did this work before? N/A Chrome version: 59.0.3071.115 Channel: n/a OS Version: OS X 10.12.6 Flash Version: I'm working as developer for web and for Electron app, which use Chromium. Electron apps are notorious for having lags and not the best performance. This shows that even a completely blank page will do event-work and consume CPU when mouse moves over it.
,
Aug 17 2017
Thanks for caring about this. We recently put a bunch of resources into reducing the CPU usage of mouse events, they fire at a less frequent rate now. Note that blank.html page really isn't a blank page as the page actually spans the entire window and there are DOM elements (like document, body and window) that are automatically added. Yes we could optimize for the case when there is nothing there but that is in the reallly uncommon case so it doesn't justify putting effort into dealing with empty documents. We track the time it takes for hit test and in general it is significantly less than the time spent doing other tasks in webpages.
,
Aug 17 2017
Do you think it might be possible to improve here, if someone specified "pointer-events: none" on the body tag? This is an issue if you use Chromium for displaying interaction-less widgets on the desktop. Is there some workaround? Like adding a 100%/100% transparent absolute zIndexed div in front of everything?
,
Aug 17 2017
Of course it's not about empty documents. It's about documents with static content that don't need any mouse-over handling at all. |
||
►
Sign in to add a comment |
||
Comment 1 by tkent@chromium.org
, Aug 17 2017