Chromium Code Reviews
Help | Chromium Project | Sign in

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

Can't Edit
Can't Publish+Mail
Start Review
1 year, 5 months ago by jamesr (out of office)
1 year, 5 months ago
CC:,, danakj, aelias, Vangelis Kokkevis


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


Patch Set 1 #

Patch Set 2 : rebased #

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


Total messages: 5
jamesr (out of office)
Some numbers: On my linux box at ToT, FCM is 12% slower than pure software ...
1 year, 5 months ago #1
Thanks for doing this James. I meant to reply in the bug earlier. I don't ...
1 year, 5 months ago #2
lgtm I like this a lot. This moves what used to be a per-layer decision ...
1 year, 5 months ago #3
I haz the power (commit-bot)
CQ is trying da patch. Follow status at
1 year, 5 months ago #4
I haz the power (commit-bot)
1 year, 5 months ago #5
Change committed as 164125
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6