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

Issue 1133923002: ui: Replace std::vector with a simple array in ClipTransformRecorder. (Closed)

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

Description

ui: Replace std::vector with a simple array in ClipTransformRecorder. std::vector shows up as hot in profiling as push_back() is presumably using heap allocation. Since we don't need to support an arbitrary number of operations on a single ClipTransformRecorder we can do better with a simple array. This provides a change for a single tab spinner in the UI compositor from 0.172935 ms to 0.168272 ms which is a 3% improvement in record time (time spent in LayerTreeHost::UpdateLayers). R=sky BUG=466426 Committed: https://crrev.com/71b6c7df348b822b5ed223cb8374d0cfe67f445c Cr-Commit-Position: refs/heads/master@{#329185}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -13 lines) Patch
M ui/compositor/clip_transform_recorder.h View 1 chunk +4 lines, -1 line 0 comments Download
M ui/compositor/clip_transform_recorder.cc View 7 chunks +17 lines, -12 lines 2 comments Download

Messages

Total messages: 11 (3 generated)
danakj
5 years, 7 months ago (2015-05-08 23:42:28 UTC) #1
sky
LGTM https://codereview.chromium.org/1133923002/diff/1/ui/compositor/clip_transform_recorder.cc File ui/compositor/clip_transform_recorder.cc (right): https://codereview.chromium.org/1133923002/diff/1/ui/compositor/clip_transform_recorder.cc#newcode51 ui/compositor/clip_transform_recorder.cc:51: DCHECK_LT(num_closers_, arraysize(closers_)); nit: maybe inline this in the ...
5 years, 7 months ago (2015-05-09 15:02:35 UTC) #2
danakj
https://codereview.chromium.org/1133923002/diff/1/ui/compositor/clip_transform_recorder.cc File ui/compositor/clip_transform_recorder.cc (right): https://codereview.chromium.org/1133923002/diff/1/ui/compositor/clip_transform_recorder.cc#newcode51 ui/compositor/clip_transform_recorder.cc:51: DCHECK_LT(num_closers_, arraysize(closers_)); On 2015/05/09 15:02:34, sky wrote: > nit: ...
5 years, 7 months ago (2015-05-10 03:13:16 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133923002/1
5 years, 7 months ago (2015-05-10 03:15:16 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
5 years, 7 months ago (2015-05-10 07:19:16 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133923002/1
5 years, 7 months ago (2015-05-11 16:29:49 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-11 18:11:25 UTC) #10
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 18:12:06 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/71b6c7df348b822b5ed223cb8374d0cfe67f445c
Cr-Commit-Position: refs/heads/master@{#329185}

Powered by Google App Engine
This is Rietveld 408576698