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

Issue 994483002: Oilpan: promptly free per-frame document heap vector. (Closed)

Created:
5 years, 9 months ago by sof
Modified:
5 years, 9 months ago
CC:
dstockwell, darktears, blink-reviews, blink-reviews-animation_chromium.org, Eric Willigers, Mike Lawther (Google), rjwright, shans, Steve Block, Timothy Loh
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: promptly free per-frame document heap vector. The per-frame updating of animations create a small vector on the heap each time around. Most of the time the update checking will not trigger additional heap allocations (or work), so by promptly releasing the heap vector, the allocation pointer can simply be reset. R=haraken BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191615

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M Source/core/page/PageAnimator.cpp View 1 chunk +4 lines, -0 lines 2 comments Download

Messages

Total messages: 11 (3 generated)
sof
Please take a look/consider. I haven't gauged the effect, but it seems like needless creation ...
5 years, 9 months ago (2015-03-09 10:24:06 UTC) #2
haraken
LGTM My previous experiment of adding destructors to HeapVectors failed because of the overhead of ...
5 years, 9 months ago (2015-03-09 11:02:14 UTC) #3
sof
On 2015/03/09 11:02:14, haraken wrote: > LGTM > > My previous experiment of adding destructors ...
5 years, 9 months ago (2015-03-10 08:01:07 UTC) #4
sof
On 2015/03/10 08:01:07, sof wrote: > On 2015/03/09 11:02:14, haraken wrote: > > LGTM > ...
5 years, 9 months ago (2015-03-10 10:12:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/994483002/1
5 years, 9 months ago (2015-03-10 10:13:47 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=191615
5 years, 9 months ago (2015-03-10 11:30:07 UTC) #8
dstockwell
https://codereview.chromium.org/994483002/diff/1/Source/core/page/PageAnimator.cpp File Source/core/page/PageAnimator.cpp (right): https://codereview.chromium.org/994483002/diff/1/Source/core/page/PageAnimator.cpp#newcode73 Source/core/page/PageAnimator.cpp:73: documents.clear(); This might be a reasonable optimiziation, but to ...
5 years, 9 months ago (2015-03-10 22:38:31 UTC) #10
haraken
5 years, 9 months ago (2015-03-10 23:26:08 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/994483002/diff/1/Source/core/page/PageAnimato...
File Source/core/page/PageAnimator.cpp (right):

https://codereview.chromium.org/994483002/diff/1/Source/core/page/PageAnimato...
Source/core/page/PageAnimator.cpp:73: documents.clear();
On 2015/03/10 22:38:31, dstockwell wrote:
> This might be a reasonable optimiziation, but to a non-oilpan expert it's not
> clear what the purpose is. Once the oilpan if-defs are removed there's nothing
> to prevent someone from cleaning this up. Is there something we can do to
> improve the readability here? Maybe a different named HeapVector?

Yeah, that's something we're considering.

Option 1: Introduce StackVector.

Option 2: Add a destructor for an on-stack HeapVector so that the HeapVector is
promptly cleared. (But I'm failing at implementing the destructor in a way in
which it doesn't regress performance.)

Option 3: Explicitly add .clear() with a comment.

Powered by Google App Engine
This is Rietveld 408576698