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

Issue 1123983002: cc: Use a ListContainer for DisplayItemList to reduce allocations. (Closed)

Created:
5 years, 7 months ago by danakj
Modified:
5 years, 7 months ago
Reviewers:
chrishtr, ajuma, enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, enne (OOO), jbauman+watch_chromium.org, kalyank, pdr., piman+watch_chromium.org, piman, sadrul, sievers+watch_chromium.org, sky, Ian Vollick, jbroman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Use a ListContainer for DisplayItemList to reduce allocations. Currently every DisplayItem is malloced/freed individually. Follow the pattern used for DrawQuads instead, using ListContainer to allocate log(n) times instead of once for each item. This replaces each DisplayFooItem::Create(...) with a default constructor and a DisplayFooItem::SetNew(...) that must be called on newly constructed items before they are used. This patch changes the time to do UpdateLayers (after making gfx::ImageSkiaReps immutable cuz they dominate times for now) for a single tab loading spinner from .174ms to .167ms on a linux x620, giving a 4% reduction in frame record time. I used a mean of 3000 samples in each run to reduce noise. R=ajuma, enne BUG=466426 Committed: https://crrev.com/f15802914bd7a8f5ea8c4d7893e9c79450804714 Cr-Commit-Position: refs/heads/master@{#328797}

Patch Set 1 #

Total comments: 1

Patch Set 2 : displaylistcontainer: addmissingfile #

Patch Set 3 : displaylistcontainer: . #

Patch Set 4 : displaylistcontainer: fixdcheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -187 lines) Patch
M cc/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/blink/web_display_item_list_impl.cc View 4 chunks +26 lines, -19 lines 0 comments Download
M cc/cc.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/picture_image_layer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/picture_image_layer_unittest.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/quads/list_container.h View 2 chunks +3 lines, -1 line 0 comments Download
M cc/quads/list_container.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/resources/clip_display_item.h View 2 chunks +4 lines, -12 lines 0 comments Download
M cc/resources/clip_display_item.cc View 1 chunk +7 lines, -3 lines 0 comments Download
M cc/resources/clip_path_display_item.h View 3 chunks +3 lines, -8 lines 0 comments Download
M cc/resources/clip_path_display_item.cc View 1 chunk +9 lines, -4 lines 0 comments Download
M cc/resources/compositing_display_item.h View 3 chunks +6 lines, -11 lines 0 comments Download
M cc/resources/compositing_display_item.cc View 1 chunk +13 lines, -10 lines 0 comments Download
M cc/resources/display_item_list.h View 1 2 3 chunks +23 lines, -2 lines 0 comments Download
M cc/resources/display_item_list.cc View 1 2 3 9 chunks +54 lines, -21 lines 0 comments Download
M cc/resources/display_item_list_unittest.cc View 10 chunks +38 lines, -16 lines 0 comments Download
M cc/resources/display_list_recording_source.cc View 1 chunk +1 line, -0 lines 0 comments Download
M cc/resources/drawing_display_item.h View 2 chunks +3 lines, -5 lines 0 comments Download
M cc/resources/drawing_display_item.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M cc/resources/filter_display_item.h View 3 chunks +3 lines, -7 lines 0 comments Download
M cc/resources/filter_display_item.cc View 1 chunk +7 lines, -3 lines 0 comments Download
M cc/resources/float_clip_display_item.h View 3 chunks +3 lines, -6 lines 0 comments Download
M cc/resources/float_clip_display_item.cc View 1 chunk +5 lines, -2 lines 0 comments Download
A cc/resources/largest_display_item.h View 1 1 chunk +17 lines, -0 lines 0 comments Download
A cc/resources/largest_display_item.cc View 1 1 chunk +71 lines, -0 lines 0 comments Download
M cc/resources/transform_display_item.h View 3 chunks +3 lines, -7 lines 0 comments Download
M cc/resources/transform_display_item.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M cc/test/fake_content_layer_client.cc View 3 chunks +12 lines, -8 lines 0 comments Download
M cc/test/fake_display_list_recording_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/clip_transform_recorder.h View 1 chunk +6 lines, -1 line 0 comments Download
M ui/compositor/clip_transform_recorder.cc View 4 chunks +26 lines, -13 lines 0 comments Download
M ui/compositor/compositing_recorder.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M ui/compositor/paint_cache.h View 2 chunks +4 lines, -7 lines 0 comments Download
M ui/compositor/paint_cache.cc View 1 chunk +7 lines, -6 lines 0 comments Download
M ui/compositor/paint_recorder.cc View 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (4 generated)
danakj
5 years, 7 months ago (2015-05-06 01:00:22 UTC) #1
danakj
+pdr/chrishtr fyi, this should help blink perf numbers a bit too
5 years, 7 months ago (2015-05-06 01:01:45 UTC) #2
chrishtr
Cool. Presumably the Blink-side DisplayItemList class will also benefit from this.
5 years, 7 months ago (2015-05-06 03:51:08 UTC) #4
chrishtr
Filed crbug.com/484943.
5 years, 7 months ago (2015-05-06 03:55:32 UTC) #5
jbroman
Heh, this CL totally obsoletes the CL I had been working on for the past ...
5 years, 7 months ago (2015-05-06 04:09:12 UTC) #6
jbroman
One comment, though: for phase 1, we are presently only using the picture, so why ...
5 years, 7 months ago (2015-05-06 04:35:23 UTC) #7
ajuma
https://codereview.chromium.org/1123983002/diff/1/cc/resources/display_item_list.cc File cc/resources/display_item_list.cc (right): https://codereview.chromium.org/1123983002/diff/1/cc/resources/display_item_list.cc#newcode113 cc/resources/display_item_list.cc:113: for (DisplayItem* item : items_) { With this post-processing ...
5 years, 7 months ago (2015-05-06 15:49:48 UTC) #8
chrishtr
On 2015/05/06 at 04:35:23, jbroman wrote: > One comment, though: for phase 1, we are ...
5 years, 7 months ago (2015-05-06 16:54:14 UTC) #9
chrishtr
On 2015/05/06 at 16:54:14, chrishtr wrote: > On 2015/05/06 at 04:35:23, jbroman wrote: > > ...
5 years, 7 months ago (2015-05-06 17:01:33 UTC) #10
danakj
On Wed, May 6, 2015 at 9:54 AM, <chrishtr@chromium.org> wrote: > On 2015/05/06 at 04:35:23, ...
5 years, 7 months ago (2015-05-06 17:03:32 UTC) #11
danakj
On 2015/05/06 15:49:48, ajuma wrote: > https://codereview.chromium.org/1123983002/diff/1/cc/resources/display_item_list.cc > File cc/resources/display_item_list.cc (right): > > https://codereview.chromium.org/1123983002/diff/1/cc/resources/display_item_list.cc#newcode113 > ...
5 years, 7 months ago (2015-05-06 22:56:59 UTC) #14
ajuma
On 2015/05/06 22:56:59, danakj wrote: > On 2015/05/06 15:49:48, ajuma wrote: > > > https://codereview.chromium.org/1123983002/diff/1/cc/resources/display_item_list.cc ...
5 years, 7 months ago (2015-05-06 23:21:36 UTC) #15
danakj
On Wed, May 6, 2015 at 4:21 PM, <ajuma@chromium.org> wrote: > On 2015/05/06 22:56:59, danakj ...
5 years, 7 months ago (2015-05-06 23:24:29 UTC) #16
danakj
PTAL
5 years, 7 months ago (2015-05-06 23:29:06 UTC) #17
ajuma
lgtm!
5 years, 7 months ago (2015-05-07 13:23:31 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1123983002/100001
5 years, 7 months ago (2015-05-07 17:52:18 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:100001)
5 years, 7 months ago (2015-05-07 18:26:24 UTC) #21
commit-bot: I haz the power
5 years, 7 months ago (2015-05-07 18:27:09 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f15802914bd7a8f5ea8c4d7893e9c79450804714
Cr-Commit-Position: refs/heads/master@{#328797}

Powered by Google App Engine
This is Rietveld 408576698