Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 473953002: Defer scroll offset change notification to browser (Closed)

Created:
6 years, 4 months ago by Sami
Modified:
6 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Defer scroll offset change notification to browser When the main frame's scroll offset changes, we notify the browser about this using ViewHostMsg_DidChangeScrollOffset. It turns out that 1) sending this message immediately makes the renderer main thread very likely to become descheduled, and 2) this notification is only used for hiding the mouse cursor when the page starts scrolling. Since this signal isn't latency sensitive (and there are other mechanisms for low latency scroll synchronization), we can defer sending it until the current frame has been composited and we're otherwise idle. Doing this reduces the average duration of ScrollableArea:: scrollPositionChanged on from 0.5 ms to 0.2 ms on a Nexus 5. Trace before: https://drive.google.com/open?id=0ByyxMXB38gLDRUY1VFJvZFFhVHc&authuser=1 Trace after: https://drive.google.com/open?id=0ByyxMXB38gLDX1VwWmxvbTRBWWc&authuser=1 BUG=359566 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289898

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -7 lines) Patch
M content/renderer/render_view_impl.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/render_view_impl.cc View 3 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Sami
6 years, 4 months ago (2014-08-14 16:07:31 UTC) #1
jamesr
This is also used by autofill (which should work fine) and by the android webview ...
6 years, 4 months ago (2014-08-14 17:16:52 UTC) #2
jamesr
This is also used by autofill (which should work fine) and by the android webview ...
6 years, 4 months ago (2014-08-14 17:16:58 UTC) #3
Sami
On 2014/08/14 17:16:58, jamesr wrote: > This is also used by autofill (which should work ...
6 years, 4 months ago (2014-08-14 17:29:29 UTC) #4
jamesr
There's a content public notification: https://code.google.com/p/chromium/codesearch#chromium/src/content/public/renderer/render_view_observer.h&q=DidChangeScrollOffset&sq=package:chromium&type=cs&l=82 registered here: https://code.google.com/p/chromium/codesearch#chromium/src/components/autofill/content/renderer/autofill_agent.cc&q=DidChangeScrollOffset&sq=package:chromium&type=cs&l=249 it just hides a popup, don't ...
6 years, 4 months ago (2014-08-14 17:31:00 UTC) #5
Sami
On 2014/08/14 17:31:00, jamesr wrote: > There's a content public notification: > > https://code.google.com/p/chromium/codesearch#chromium/src/content/public/renderer/render_view_observer.h&q=DidChangeScrollOffset&sq=package:chromium&type=cs&l=82 > ...
6 years, 4 months ago (2014-08-14 17:48:59 UTC) #6
jamesr
Ah right, that's renderer. lgtm but please confirm the android webview usage before landing
6 years, 4 months ago (2014-08-14 18:02:16 UTC) #7
mkosiba (inactive)
lgtm, it doesn't look like the webview uses this message.
6 years, 4 months ago (2014-08-14 19:08:37 UTC) #8
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-15 09:26:35 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/473953002/1
6 years, 4 months ago (2014-08-15 09:27:55 UTC) #10
commit-bot: I haz the power
6 years, 4 months ago (2014-08-15 16:20:49 UTC) #11
Message was sent while issue was closed.
Committed patchset #1 (1) as 289898

Powered by Google App Engine
This is Rietveld 408576698