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

Issue 154003006: cc: Switch to vector based TaskGraph implementation. (Closed)

Created:
6 years, 10 months ago by reveman
Modified:
6 years, 10 months ago
Reviewers:
vmpstr, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

cc: Switch to vector based TaskGraph implementation. Provides improved performance for graph sizes used with impl-side painting. Here are two reasons for why this is better: 1. TaskGraph creation can be done without any heap allocations. Prior to this we spent most of the graph construction time creating and deleting objects. This eliminates that completely. 2. Linear scans are typically faster than hash map lookups for the number of nodes and edges used in our task graphs. A large graph with raster tasks typically has ~50 nodes and ~100 edges. Improvement in graph construction performance is somewhere between 5x-10x on desktop and likely even greater on Android where heap allocations might be more expensive. Graph scheduling performance is up by 3x-10x while the improvement to execution time is a more moderate 2x-5x. Execution cost is less important as it's paid by worker threads and already considered good enough before this change. There's still room for improvement after this change. ie. by keeping graph edges sorted, DependentIterator performance can be improved. Trivial changes to our RasterWorkerPool implementations are needed to further avoid heap allocations and fully take advantage of the performance improvements in this patch. This has been left as follow up work. BUG=246546 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249589

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 16

Patch Set 3 : address review feedback #

Patch Set 4 : minor comment update #

Patch Set 5 : build fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+478 lines, -470 lines) Patch
M cc/resources/image_raster_worker_pool.h View 1 1 chunk +0 lines, -9 lines 0 comments Download
M cc/resources/image_raster_worker_pool.cc View 1 2 3 chunks +25 lines, -39 lines 0 comments Download
M cc/resources/pixel_buffer_raster_worker_pool.cc View 1 2 7 chunks +36 lines, -54 lines 0 comments Download
M cc/resources/raster_worker_pool.h View 1 2 3 chunks +13 lines, -10 lines 0 comments Download
M cc/resources/raster_worker_pool.cc View 1 2 7 chunks +39 lines, -34 lines 0 comments Download
M cc/resources/raster_worker_pool_perftest.cc View 1 1 chunk +20 lines, -17 lines 0 comments Download
M cc/resources/task_graph_runner.h View 1 2 3 7 chunks +63 lines, -63 lines 0 comments Download
M cc/resources/task_graph_runner.cc View 1 2 3 4 11 chunks +215 lines, -142 lines 0 comments Download
M cc/resources/task_graph_runner_perftest.cc View 1 5 chunks +59 lines, -54 lines 0 comments Download
M cc/resources/task_graph_runner_unittest.cc View 1 2 2 chunks +8 lines, -48 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
reveman
6 years, 10 months ago (2014-02-06 00:13:24 UTC) #1
reveman
FYI, some of the changes in this patch are from https://codereview.chromium.org/140333006/ I'll rebase this as ...
6 years, 10 months ago (2014-02-06 00:15:36 UTC) #2
enne (OOO)
lgtm in general % vmpstr https://codereview.chromium.org/154003006/diff/40001/cc/resources/image_raster_worker_pool.cc File cc/resources/image_raster_worker_pool.cc (right): https://codereview.chromium.org/154003006/diff/40001/cc/resources/image_raster_worker_pool.cc#newcode37 cc/resources/image_raster_worker_pool.cc:37: unsigned priority = 2u; ...
6 years, 10 months ago (2014-02-06 18:49:14 UTC) #3
vmpstr
Also lgtm, aside from the comments below. To be completely honest, it's kind of hard ...
6 years, 10 months ago (2014-02-06 19:44:37 UTC) #4
reveman
PTAL. FYI, I'm working on an updated worker pool doc that describes some follow up ...
6 years, 10 months ago (2014-02-06 20:51:52 UTC) #5
vmpstr
lgtm, thanks for the updates
6 years, 10 months ago (2014-02-06 20:58:08 UTC) #6
reveman
The CQ bit was checked by reveman@chromium.org
6 years, 10 months ago (2014-02-06 21:08:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/154003006/180001
6 years, 10 months ago (2014-02-06 21:10:10 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-06 21:52:10 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, cacheinvalidation_unittests, cc_unittests, check_deps, ...
6 years, 10 months ago (2014-02-06 21:52:11 UTC) #10
reveman
The CQ bit was checked by reveman@chromium.org
6 years, 10 months ago (2014-02-06 22:12:55 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/154003006/310002
6 years, 10 months ago (2014-02-06 22:13:54 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-07 01:50:04 UTC) #13
commit-bot: I haz the power
Failed to apply the patch. svn: Commit failed (details follow): svn: Can't get username or ...
6 years, 10 months ago (2014-02-07 01:50:05 UTC) #14
reveman
The CQ bit was checked by reveman@chromium.org
6 years, 10 months ago (2014-02-07 01:52:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/154003006/310002
6 years, 10 months ago (2014-02-07 02:16:53 UTC) #16
commit-bot: I haz the power
6 years, 10 months ago (2014-02-07 02:42:34 UTC) #17
Message was sent while issue was closed.
Change committed as 249589

Powered by Google App Engine
This is Rietveld 408576698