Open Bug 725851 Opened 10 years ago Updated 3 years ago

Throttle/Coalesce Scroll events on OSX with the trackpad

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
macOS
defect
Not set
normal

Tracking

()

People

(Reporter: mattwoodrow, Unassigned)

References

Details

(Whiteboard: [Snappy:P2])

Scrolling performance on http://acko.net/files/dump/parallax.html is really bad due to the large number of scroll events generated.

I'm seeing up to 4 calls to [ChildView scrollWheel] between paints, each of these can call [ChildView scrollWheel:forAxis] twice, and that can call nsChildView::DispatchEvent twice (NS_MOUSE_PIXEL_SCROLL and NS_MOUSE_SCROLL). This results in up to 16 calls to nsLayoutUtils::GetFrameForPoint between paints, and this is really hurting interactive performance on this complex page.
Blocks: 722603
After I fix bug 719320, nsChildView will dispatch only one event to PresShell. ESM::PostHandleEvent() will dispatch the both legacy mouse scroll events if the new wheel event isn't consumed by contents. After that, ESM::PostHandleEvent() will scroll something. It may help to reduce the cost.
Depends on: 719320
Is this something to put on the Snappy radar?
Whiteboard: [Snappy]
Whiteboard: [Snappy] → [Snappy:P2]
Bug 719320 has been fixed on mozilla-central. It succeeded to reduce the number of mouse scroll events from cocoa widget. It's not fixed actual cause of this bug but it should improve the performance.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.