Closed Bug 742128 Opened 8 years ago Closed 3 years ago
Use a more efficient mechanism for notify Gecko about viewport changes
On a page that is quick to paint (13ms) we spend 10% of our time under NotifyObservers() handling "Viewport:Changed"
In total about 3-5ms
So then this doesn't include the JSON serialization of the viewport in java. There isn't a whole lot we can trim out of the browser.js Viewport:Changed handler. There are three main operations - scrollTo, setResolution, and setDisplayPortForElement. Do you know which of those three is taking the most time? Or is it something else?
Depends on: 727352
(In reply to Kartikaya Gupta (:kats) from comment #2) > So then this doesn't include the JSON serialization of the viewport in java. > There isn't a whole lot we can trim out of the browser.js Viewport:Changed > handler. There are three main operations - scrollTo, setResolution, and > setDisplayPortForElement. Do you know which of those three is taking the > most time? Or is it something else? I don't know anything more currently.
We need more information before we can figure out whether to block on this. Jeff, can you profile or otherwise gather that information?
Assignee: nobody → jmuizelaar
A thought: how many times are handling the Viewport:Changed event in Gecko after a paint? Do we have a queue of a lot of these?
So with the code that's currently in m-c we do very aggressive coalescing of Viewport:Changed events (aggressive to the point of being wrong) so we shouldn't have very many of these events actually being processed by Gecko. I have a couple of patches in bug 740883 that cleans up the coalescing behaviour; this results in slightly more Viewport:Changed events being processed while the user's finger is actually on the screen (because the Viewport:Changed events are being interleaved with touch events and we can't coalesce them). Once the user's finger is lifted we coalesce them more.
Superseded by APZ?
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.