New issue
Advanced search Search tips

Issue 607340 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Trackpad scrolling on github code is very very slow

Project Member Reported by esprehn@chromium.org, Apr 27 2016

Issue description

Google Chrome	52.0.2718.0 (Official Build) canary (64-bit)
Revision	fd0a0f9879fc02e65d477f57f8f929fa4d7f0b75-refs/heads/master@{#389938}
OS	Mac OS X 

ex.

https://github.com/WebKit/webkit/blob/038c16d8912e695694e6493ecb7d75f6b84ed17e/Source/WebCore/rendering/RenderLayerCompositor.cpp#L964

hover the code and scroll horizontally with your track pad.

Looking at the trace it seems like we're both main thread scrolling and doing a 40ms paint invalidation on every frame.

This appears much better in Stable, there's still the 40ms paint invalidations but we do some at the beginning and some at the end, but not the whole scroll. In Canary we seem to be doing them constantly, and also seem to react to the input very sluggishly, for example we keep scrolling around even after you stop sending input. Is that smooth scroll?
 
trace_github-sideways-scroll.json.gz
4.6 MB Download
Cc: tdres...@chromium.org
Owner: dtapu...@chromium.org
Yikes, thanks.

There are two distinct issues here, the long paints, and the fact that we aren't coalescing the wheel events correctly.

The lag that you're feeling is, I think, because we aren't coalescing the events properly.

My guess is that this is due to Dave's wheel gestures work.
I've root caused it and it is the gesture event queue that is backing up.

Because of the synthetic gesture begin and ends we are generating it causes
issues with coalescing the gesture scroll updates which doesn't happen.

Collapsing a synthetic gesture scroll begin with a synthetic gesture scroll end should be the right thing to do. I've written a patch but will add a test.
Project Member

Comment 3 by bugdroid1@chromium.org, May 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dcd46c08887b38add468d81bf3b5bf4910d0f248

commit dcd46c08887b38add468d81bf3b5bf4910d0f248
Author: dtapuska <dtapuska@chromium.org>
Date: Mon May 02 14:52:32 2016

Trackpad scrolling could lag on MacOSX

Mouse wheel gesture scrolling with synthetic begin and ends
could saturate the gesture event queue. Ensure that
a synthetic gesture begin coalesces with a synthetic
gesture end so that the updates end up coalescing as well.
This prevents laggy scrolling on MacOSX when it takes
a long time per frame to scroll.

BUG= 607340 

Review-Url: https://codereview.chromium.org/1932363002
Cr-Commit-Position: refs/heads/master@{#390942}

[modify] https://crrev.com/dcd46c08887b38add468d81bf3b5bf4910d0f248/content/browser/renderer_host/input/gesture_event_queue.cc
[modify] https://crrev.com/dcd46c08887b38add468d81bf3b5bf4910d0f248/content/browser/renderer_host/input/gesture_event_queue.h
[modify] https://crrev.com/dcd46c08887b38add468d81bf3b5bf4910d0f248/content/browser/renderer_host/input/gesture_event_queue_unittest.cc

Status: Started (was: Assigned)
I'll keep this bug opened and wait and test in canary before requesting merge to 51.

Thanks for the fix, we will verify in next canary.
Labels: OS-Mac
Labels: Merge-Request-51

Comment 8 by tin...@google.com, May 4 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 9 by bugdroid1@chromium.org, May 4 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84fdd1d3433ee491096cddea636f45491779483e

commit 84fdd1d3433ee491096cddea636f45491779483e
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed May 04 12:58:29 2016

Trackpad scrolling could lag on MacOSX

Mouse wheel gesture scrolling with synthetic begin and ends
could saturate the gesture event queue. Ensure that
a synthetic gesture begin coalesces with a synthetic
gesture end so that the updates end up coalescing as well.
This prevents laggy scrolling on MacOSX when it takes
a long time per frame to scroll.

BUG= 607340 

Review-Url: https://codereview.chromium.org/1932363002
Cr-Commit-Position: refs/heads/master@{#390942}
(cherry picked from commit dcd46c08887b38add468d81bf3b5bf4910d0f248)

Review URL: https://codereview.chromium.org/1949993002 .

Cr-Commit-Position: refs/branch-heads/2704@{#369}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/84fdd1d3433ee491096cddea636f45491779483e/content/browser/renderer_host/input/gesture_event_queue.cc
[modify] https://crrev.com/84fdd1d3433ee491096cddea636f45491779483e/content/browser/renderer_host/input/gesture_event_queue.h
[modify] https://crrev.com/84fdd1d3433ee491096cddea636f45491779483e/content/browser/renderer_host/input/gesture_event_queue_unittest.cc

Status: Fixed (was: Started)
Issue 617071 has been merged into this issue.
If 617071 is the same issue, then r386251 didn't fix it, since it's included in 51.0.2704.63.
Appears 617071 is not the same issue; but was caused by scroll anchoring enabled.

it is not reproducible when it is off.
Labels: Hotlist-Input-Dev

Sign in to add a comment