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

Issue 2054473002: Speed up InvalidationRegion (Closed)

Created:
4 years, 6 months ago by vmiura
Modified:
4 years, 6 months ago
Reviewers:
danakj, chrishtr, enne (OOO)
CC:
chrishtr, cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Speed up InvalidationRegion Staging invalidation rectangles in a vector allows us to skip building a complex SkRegion for cases with many invalidations (> 256). For cases with fewer invalidations we will still build a full SkRegion. R=enne@chromium.org BUG=606069 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/62045ceab0fd83013d6cb781ba727d3d3ce68e18 Cr-Commit-Position: refs/heads/master@{#398755}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Limit pending_rects_ to kMaxInvalidationRectCount #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -7 lines) Patch
M cc/base/invalidation_region.h View 2 chunks +5 lines, -2 lines 0 comments Download
M cc/base/invalidation_region.cc View 1 1 chunk +22 lines, -5 lines 1 comment Download

Messages

Total messages: 27 (9 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2054473002/1
4 years, 6 months ago (2016-06-08 18:14:28 UTC) #3
vmiura
PTAL. This change gets pretty much all the improvement measured with kMaxInvalidationRectCount == 1 on ...
4 years, 6 months ago (2016-06-08 18:38:36 UTC) #4
vmiura
Most of the HTML & SVG tests on Animometer show some improvement, 5 to 10%, ...
4 years, 6 months ago (2016-06-08 18:40:02 UTC) #5
enne (OOO)
lgtm Thanks! That's nice to hear that just the vector maintains the same speedup. https://codereview.chromium.org/2054473002/diff/1/cc/base/invalidation_region.cc ...
4 years, 6 months ago (2016-06-08 19:05:14 UTC) #6
vmiura
https://codereview.chromium.org/2054473002/diff/1/cc/base/invalidation_region.cc File cc/base/invalidation_region.cc (right): https://codereview.chromium.org/2054473002/diff/1/cc/base/invalidation_region.cc#newcode32 cc/base/invalidation_region.cc:32: pending_rects_.push_back(rect); On 2016/06/08 19:05:14, enne wrote: > I'm prematurely ...
4 years, 6 months ago (2016-06-08 19:54:27 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2054473002/20001
4 years, 6 months ago (2016-06-08 19:54:35 UTC) #9
chrishtr
\o/
4 years, 6 months ago (2016-06-08 19:58:18 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/84370)
4 years, 6 months ago (2016-06-08 21:52:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2054473002/20001
4 years, 6 months ago (2016-06-08 21:57:20 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-09 01:14:02 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/62045ceab0fd83013d6cb781ba727d3d3ce68e18 Cr-Commit-Position: refs/heads/master@{#398755}
4 years, 6 months ago (2016-06-09 01:16:58 UTC) #19
danakj
So the take away here is that a vector of rects is more performant than ...
4 years, 6 months ago (2016-06-09 19:02:13 UTC) #21
vmiura
On 2016/06/09 19:02:13, danakj wrote: > So the take away here is that a vector ...
4 years, 6 months ago (2016-06-09 19:15:30 UTC) #22
danakj
On Thu, Jun 9, 2016 at 12:15 PM, <vmiura@chromium.org> wrote: > On 2016/06/09 19:02:13, danakj ...
4 years, 6 months ago (2016-06-09 19:53:55 UTC) #23
enne (OOO)
I think the performance hit is unioning and finding the set of non-overlapping rects to ...
4 years, 6 months ago (2016-06-09 20:00:01 UTC) #24
vmpstr
On 2016/06/09 20:00:01, enne wrote: > I think the performance hit is unioning and finding ...
4 years, 6 months ago (2016-06-09 20:44:07 UTC) #25
vmiura
Sorry didn't have time to go into more detail earlier. I haven't noticed the iteration ...
4 years, 6 months ago (2016-06-10 01:19:20 UTC) #26
vmiura
4 years, 6 months ago (2016-06-10 05:35:48 UTC) #27
Message was sent while issue was closed.
https://codereview.chromium.org/2054473002/diff/20001/cc/base/invalidation_re...
File cc/base/invalidation_region.cc (right):

https://codereview.chromium.org/2054473002/diff/20001/cc/base/invalidation_re...
cc/base/invalidation_region.cc:32: if (pending_rects_.size() >=
kMaxInvalidationRectCount)
I just realized after this change, we never get (pending_rects_.size() >
kMaxInvalidationRectCount) so in FinalizePendingRects we'll always take the
region building path.  I'll upload a fix.

Powered by Google App Engine
This is Rietveld 408576698