Long "APZScroll Payload Presented" delays recorded when pausing between pans
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: mstange, Assigned: kats)
References
Details
Attachments
(1 file)
Profile: https://share.firefox.dev/3hwMHDf
When pausing between multiple subsequent scroll gestures, the "APZScroll Payload Presented" markers in the profile often cover the duration of the pause. This seems unintentional. The markers should be going from the timestamp of the event that caused the scroll position change, to the timestamp of the composite that presented that scroll position. Either we have a mistake in the measuring, or the last scroll position update before a pause doesn't properly get presented.
Assignee | ||
Comment 1•5 years ago
|
||
I can look into this along with bug 1641070
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
I wasn't seeing this exactly when I tried to repro locally. Some latencies were in the 500ms range but they didn't line up with pausing/resuming of scrolling. I couldn't use the profiler with WR enabled in my local debug build (hit bug 1655888) so I tried with WR disabled. Not sure if that's a factor.
Assignee | ||
Comment 3•5 years ago
|
||
I tested this again with logging and believe the problem is that we're creating scroll payloads for input events that don't result in scrolling. In this case, the pan-momentumend event triggers a call to OnPan in case there is some scroll delta on that event. In the case that there is no delta, we still end up creating the payload and attempting the scroll which is basically a no-op. That therefore doesn't trigger a composite, and the payload only gets recorded on the next composite which can be some time later.
Assignee | ||
Comment 4•5 years ago
|
||
It's easy enough to fix this specific case but this might be a general class of problems with other input events too. I can think of ways to fix the entire class of problems (e.g. use some RAII thing around the entire input handling mechanism and only register the payload if the input triggered a call to ScheduleComposite). However, I think that approach might paper over legitimate bugs where we get an input event and erroneously don't request a composite. As-is, that sort of bug will show up as a payload with high latency but with the RAII approach we wouldn't even generate a payload and so would lose a potentially useful detection mechanism.
So for now I'm inclined to just do the spot fix and if we keep running into issues like this in the future we can consider a more holistic fix.
Assignee | ||
Comment 5•5 years ago
|
||
This is a bit of a spot fix for the specific scenario encountered. If there are
other scenarios in which we encounter a similar problem we should consider a
higher level fix.
Reporter | ||
Comment 7•5 years ago
|
||
Thanks! I agree that a spot fix seems appropriate.
![]() |
||
Comment 8•5 years ago
|
||
bugherder |
Description
•