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

Issue 2729243002: Improve performance of GeometryMapper cache. (Closed)

Created:
3 years, 9 months ago by chrishtr
Modified:
3 years, 9 months ago
Reviewers:
pdr., Xianzhu
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, Henrik Grunell
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve performance of GeometryMapper cache. 1. Store clips and transforms in vectors attached to the clip and transform nodes. This avoids all hash map lookups. Invalidation uses a global cache generation id (currently we don't support anything other than global invalidation of the GeometryMapper caches). 2. Return clips and transforms by reference, to avoid copying. #1 is expected to be a good optimization because we almost always compute clips and transforms relative to the same ancestor, so the vectors are short and hash lookups are reduced. BUG=692614 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2729243002 Cr-Commit-Position: refs/heads/master@{#455571} Committed: https://chromium.googlesource.com/chromium/src/+/ee72c4b5d2fd1e4882bddca66e0f89fe8784a7fc

Patch Set 1 #

Patch Set 2 : none #

Patch Set 3 : none #

Patch Set 4 : none #

Patch Set 5 : none #

Patch Set 6 : none #

Patch Set 7 : none #

Patch Set 8 : none #

Patch Set 9 : none #

Patch Set 10 : none #

Patch Set 11 : none #

Total comments: 2

Patch Set 12 : none #

Patch Set 13 : none #

Patch Set 14 : none #

Patch Set 15 : none #

Patch Set 16 : none #

Patch Set 17 : none #

Total comments: 4

Patch Set 18 : none #

Total comments: 2

Patch Set 19 : none #

Total comments: 2

Patch Set 20 : none #

Patch Set 21 : none #

Patch Set 22 : none #

Patch Set 23 : none #

Patch Set 24 : none #

Total comments: 8

Patch Set 25 : none #

Patch Set 26 : none #

Patch Set 27 : none #

Patch Set 28 : none #

Patch Set 29 : none #

Patch Set 30 : none #

Patch Set 31 : none #

Patch Set 32 : none #

Patch Set 33 : none #

Patch Set 34 : none #

Patch Set 35 : none #

Patch Set 36 : none #

Patch Set 37 : none #

Patch Set 38 : none #

Patch Set 39 : none #

Patch Set 40 : none #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -113 lines) Patch
M third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -36 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 9 chunks +35 lines, -49 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/paint/GeometryMapperClipCache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +68 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/paint/GeometryMapperClipCache.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +54 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +27 lines, -23 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +56 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +52 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 79 (52 generated)
chrishtr
It looks like GeometryMapper for PaintLayerClipper use cases caused about a 4-6% regression in caching-disabled ...
3 years, 9 months ago (2017-03-07 04:46:33 UTC) #15
Xianzhu
On 2017/03/07 04:46:33, chrishtr wrote: > It looks like GeometryMapper for PaintLayerClipper use cases caused ...
3 years, 9 months ago (2017-03-07 16:50:26 UTC) #16
Xianzhu
lgtm I updated title of crbug.com/692614 to "SlimmingPaintInvalidation performance regression because of cost of GeometryMapper" ...
3 years, 9 months ago (2017-03-07 16:58:46 UTC) #18
chrishtr
https://codereview.chromium.org/2729243002/diff/200001/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp File third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp (right): https://codereview.chromium.org/2729243002/diff/200001/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp#newcode348 third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp:348: // --enable-prefer-compositing-to-lcd-text) for details. On 2017/03/07 at 16:58:46, Xianzhu ...
3 years, 9 months ago (2017-03-07 19:09:01 UTC) #19
chrishtr
Test of turning off GeometryMapper for paint: https://storage.cloud.google.com/cluster-telemetry/tasks/chromium_perf_runs/chrishtr-20170217212346/html/index.html -4.196% record_time_caching_disabled Test of first patchset of ...
3 years, 9 months ago (2017-03-07 19:15:58 UTC) #21
chrishtr
PTAL. I moved the caches onto the clip and transform nodes, thereby removing all uses ...
3 years, 9 months ago (2017-03-07 23:05:35 UTC) #23
Xianzhu
lgtm. https://codereview.chromium.org/2729243002/diff/320001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp File third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp (right): https://codereview.chromium.org/2729243002/diff/320001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp#newcode91 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp:91: CHECK(getCachedClip(clipAndTransform)); Should this be DCHECK? https://codereview.chromium.org/2729243002/diff/320001/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp File third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp ...
3 years, 9 months ago (2017-03-07 23:19:06 UTC) #26
chrishtr
https://codereview.chromium.org/2729243002/diff/320001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp File third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp (right): https://codereview.chromium.org/2729243002/diff/320001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp#newcode91 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp:91: CHECK(getCachedClip(clipAndTransform)); On 2017/03/07 at 23:19:06, Xianzhu wrote: > Should ...
3 years, 9 months ago (2017-03-07 23:21:25 UTC) #27
pdr.
https://codereview.chromium.org/2729243002/diff/340001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h File third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h (right): https://codereview.chromium.org/2729243002/diff/340001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h#newcode141 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h:141: std::unique_ptr<Vector<ClipCacheEntry>> m_clipCache; We're exposing a lot of geometry mapper's ...
3 years, 9 months ago (2017-03-07 23:22:13 UTC) #29
pdr.
https://codereview.chromium.org/2729243002/diff/360001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h File third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h (right): https://codereview.chromium.org/2729243002/diff/360001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h#newcode133 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h:133: nit: extra newline https://codereview.chromium.org/2729243002/diff/360001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h#newcode143 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h:143: const FloatClipRect m_infiniteClip; I ...
3 years, 9 months ago (2017-03-07 23:25:43 UTC) #30
chrishtr
https://codereview.chromium.org/2729243002/diff/340001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h File third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h (right): https://codereview.chromium.org/2729243002/diff/340001/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h#newcode141 third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h:141: std::unique_ptr<Vector<ClipCacheEntry>> m_clipCache; On 2017/03/07 at 23:22:13, pdr. wrote: > ...
3 years, 9 months ago (2017-03-08 00:35:45 UTC) #31
pdr.
Looks super awesome. I like how the logic is all in its own file now. ...
3 years, 9 months ago (2017-03-08 02:34:55 UTC) #34
chrishtr
https://codereview.chromium.org/2729243002/diff/450001/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h File third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h (right): https://codereview.chromium.org/2729243002/diff/450001/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h#newcode180 third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h:180: const FloatClipRect m_infiniteClip; On 2017/03/08 at 02:34:55, pdr. wrote: ...
3 years, 9 months ago (2017-03-08 02:59:28 UTC) #35
chrishtr
3 years, 9 months ago (2017-03-08 02:59:31 UTC) #36
pdr.
thanks, LGTM
3 years, 9 months ago (2017-03-08 03:05:13 UTC) #39
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/2729243002/490001
3 years, 9 months ago (2017-03-08 03:17:47 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_tests_slimming_paint_v2/builds/3135)
3 years, 9 months ago (2017-03-08 04:04:44 UTC) #44
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/2729243002/490001
3 years, 9 months ago (2017-03-08 04:57:59 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_tests_slimming_paint_v2/builds/3139)
3 years, 9 months ago (2017-03-08 05:08:37 UTC) #48
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/2729243002/490001
3 years, 9 months ago (2017-03-08 17:22:02 UTC) #50
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/2729243002/670001
3 years, 9 months ago (2017-03-08 19:40:32 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/323420) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 9 months ago (2017-03-08 19:52:44 UTC) #67
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/2729243002/690001
3 years, 9 months ago (2017-03-08 20:04:47 UTC) #70
commit-bot: I haz the power
Committed patchset #39 (id:690001) as https://chromium.googlesource.com/chromium/src/+/ee72c4b5d2fd1e4882bddca66e0f89fe8784a7fc
3 years, 9 months ago (2017-03-08 22:52:52 UTC) #73
Michael Achenbach
Note this breaks msan layout tests: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty%20MSAN/builds/781
3 years, 9 months ago (2017-03-09 07:25:53 UTC) #75
Michael Achenbach
A revert of this CL (patchset #39 id:690001) has been created in https://codereview.chromium.org/2738113003/ by machenbach@chromium.org. ...
3 years, 9 months ago (2017-03-09 09:12:47 UTC) #78
Michael Achenbach
3 years, 9 months ago (2017-03-09 09:23:32 UTC) #79
Message was sent while issue was closed.
Also breaks chromeos msan and lets the bot time out:
https://build.chromium.org/p/chromium.memory.full/builders/Linux%20ChromeOS%2...

The swarming shard output of the timed-out shards shows failures from this CL.

Powered by Google App Engine
This is Rietveld 408576698