Coalesce wheel events more aggressively

RESOLVED FIXED in Firefox 55



Event Handling
3 months ago
3 months ago


(Reporter: smaug, Assigned: smaug)


50 Branch

Firefox Tracking Flags

(firefox55 fixed)


(Whiteboard: [qf:p1][platform-rel-GoogleSheets])


(1 attachment)



3 months ago
I think we can tweak the current logic a bit to coalesce events even more.
Patch coming.

Comment 1

3 months ago
Or there are various options here. 

aEvent.mTimeStamp < mLastWheelProcessedTimeFromParent could become something like
aEvent.mTimeStamp < mLastWheelProcessedTimeFromParent + TimeDuration::FromMilliseconds(250.0);

Or just always coalesce when the next message is wheel, and use time comparison only when peeking some more messages.

Comment 2

3 months ago
Or another approach is to coalesce more on pages which use lots of time in wheel listeners. That sounds better. We already do that by having mLastWheelProcessedTimeFromParent, but we could punish such pages even more.

Comment 3

3 months ago
Created attachment 8866737 [details] [diff] [review]

I filed this bug after profiling Google Spreadsheet scrolling on the Quantum Flow reference hw.

The approach shouldn't be too aggressive, since we after all try to coalesce only if there are some wheel events in the IPC channel.

Relying on the processing duration should make this scale better in different kinds of setups: on slower machines this lets us coalesce more.
Assignee: nobody → bugs
Attachment #8866737 - Flags: review?(sshih)
There's also the "compress" option in IPDL. We seem to use it for RealMouseMoveEvent but I don't see it being used for wheel stuff.
(In reply to Andrew McCreight [:mccr8] from comment #4)
> There's also the "compress" option in IPDL. We seem to use it for
> RealMouseMoveEvent but I don't see it being used for wheel stuff.
That's because we want to accumulate the delta values of the coalesced wheel event and compensate them to the event we dispatched.
Comment on attachment 8866737 [details] [diff] [review]

LGTM, thanks.
Attachment #8866737 - Flags: review?(sshih) → review+

Comment 7

3 months ago
Pushed by
Coalesce wheel events more aggressively, r=stone

Comment 8

3 months ago
Last Resolved: 3 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Whiteboard: [qf:p1][platform-rel-GoogleSheets]
You need to log in before you can comment on or make changes to this bug.