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

Issue 11273029: Throttle prepaints to avoid colliding with post-load work (Closed)

Created:
8 years, 2 months ago by jamesr
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, danakj, aelias_OOO_until_Jul13, Vangelis Kokkevis
Visibility:
Public.

Description

Throttle prepaints to avoid colliding with post-load work On the page cyclers (especially intl1) the prepaint logic in the compositor interferes with the subsequent page's load time when --force-compositing-mode is active. This is because the prepaint schedules a commit immediately after finishing a prepaint-eligible paint. On the page cyclers, this means that we frequently do a second commit just after starting the load on the next page in the set since the new page's URL is set just after the onload event. This patch tweaks the prepaint to happen only after we perform an updateLayers() that's prepaint eligible and then go 100ms (number picked somewhat arbitrarily) without receiving another setNeedsCommit(). The goal is to only prepaint if the compositor scene is roughly steady - if we're still receiving invalidations on the main content then it's less likely that prepainting will be useful. On pages in the wild that load quickly, the first prepaint after first paint is likely to collide with onload and shortly-after-onload logic. Delaying until we reach a steady state shouldn't slow down static pages but will help avoid contention and wasted work on pages that modify the page on or shortly after onload. BUG=152355 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164125

Patch Set 1 #

Patch Set 2 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -2 lines) Patch
M cc/layer_tree_host.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M cc/layer_tree_host.cc View 1 3 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jamesr
Some numbers: On my linux box at ToT, FCM is 12% slower than pure software ...
8 years, 2 months ago (2012-10-25 01:33:38 UTC) #1
epenner
Thanks for doing this James. I meant to reply in the bug earlier. I don't ...
8 years, 2 months ago (2012-10-25 02:01:12 UTC) #2
enne (OOO)
lgtm I like this a lot. This moves what used to be a per-layer decision ...
8 years, 1 month ago (2012-10-25 16:34:09 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11273029/2001
8 years, 1 month ago (2012-10-25 17:21:11 UTC) #4
commit-bot: I haz the power
8 years, 1 month ago (2012-10-25 18:55:20 UTC) #5
Change committed as 164125

Powered by Google App Engine
This is Rietveld 408576698