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

Issue 2784963002: Optimize the pre-paint tree walk and ClipRects (Closed)

Created:
3 years, 8 months ago by chrishtr
Modified:
3 years, 8 months ago
Reviewers:
pdr., Xianzhu
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize the pre-paint tree walk and ClipRects. 1. Avoid malloc for ClipRects objects. This trades reduced malloc for a somewhat larger PaintLayer. 2. Get rid of now-unnecessary logic to check clipping ancestors (GeomteryMapper now checks for transforms on infininte rects instead). 3. ALWAYS_INLINE on some helper methods of PrePaintTreeWalk. Local runs showed pre-paint time improvements in about:tracing for Paint/containment-resize.html of up to 5%. I am also running a CT analysis with and without SPInvalidation on to see effect on paint times. Early data suggests no strong change either way. (though note that this CL is mainly aimed at reducing time in pre-paint). BUG=692614 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2784963002 Cr-Commit-Position: refs/heads/master@{#460808} Committed: https://chromium.googlesource.com/chromium/src/+/65b5d60ab86950a42ade9f0aee9e5e67d8c3ff20

Patch Set 1 #

Patch Set 2 : none #

Patch Set 3 : none #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -183 lines) Patch
D third_party/WebKit/Source/core/layout/ClipRects.h View 1 2 1 chunk +0 lines, -101 lines 1 comment Download
M third_party/WebKit/Source/core/paint/ClipRects.h View 1 2 2 chunks +11 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ClipRectsCache.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 3 chunks +13 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp View 1 2 4 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h View 1 chunk +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp View 4 chunks +13 lines, -36 lines 0 comments Download

Messages

Total messages: 25 (18 generated)
chrishtr
I suggest committing this and then observing the bots. WDYT?
3 years, 8 months ago (2017-03-30 16:50:59 UTC) #15
chrishtr
https://codereview.chromium.org/2784963002/diff/40001/third_party/WebKit/Source/core/layout/ClipRects.h File third_party/WebKit/Source/core/layout/ClipRects.h (left): https://codereview.chromium.org/2784963002/diff/40001/third_party/WebKit/Source/core/layout/ClipRects.h#oldcode2 third_party/WebKit/Source/core/layout/ClipRects.h:2: * Copyright (C) 2003, 2009, 2012 Apple Inc. All ...
3 years, 8 months ago (2017-03-30 16:51:18 UTC) #16
Xianzhu
lgtm. Please put the one-line summary in the description.
3 years, 8 months ago (2017-03-30 16:54:53 UTC) #17
chrishtr
Ok committing now. Happy to revert if there is a negative impact found.
3 years, 8 months ago (2017-03-30 17:12:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2784963002/40001
3 years, 8 months ago (2017-03-30 17:12:59 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/65b5d60ab86950a42ade9f0aee9e5e67d8c3ff20
3 years, 8 months ago (2017-03-30 17:19:33 UTC) #24
chrishtr
3 years, 8 months ago (2017-04-02 17:02:42 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2792833002/ by chrishtr@chromium.org.

The reason for reverting is: On further investigation, found that this patch
introduces too much inefficiency by
making all PaintLayers pay the cost of a ClipRects object, rather than just ones
that
induce subsequences..

Powered by Google App Engine
This is Rietveld 408576698