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

Issue 2231553002: allocate memory manually in SkLiteDL (Closed)

Created:
4 years, 4 months ago by mtklein_C
Modified:
4 years, 4 months ago
Reviewers:
herb_g, mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

allocate memory manually in SkLiteDL Instead of growing at SkTDArray's chosen rate (+4, then *1.25), grow in additive 4K pages. This is my attempt to make realloc() have the best chance of not copying and to keep fragmentation down. Because we use a freelist the rate we grow doesn't affect performance too much. I'm not getting very reliable numbers, but this looks maybe 5-10% faster for recording, mainly I think from inlining the allocation fast path into push(). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231553002 Committed: https://skia.googlesource.com/skia/+/b20283357a09300353dd62962086f3791161e3b8

Patch Set 1 #

Patch Set 2 : O(1) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -54 lines) Patch
M src/core/SkLiteDL.h View 1 1 chunk +14 lines, -4 lines 0 comments Download
M src/core/SkLiteDL.cpp View 1 6 chunks +56 lines, -50 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
mtklein_C
4 years, 4 months ago (2016-08-09 21:36:42 UTC) #8
mtklein
lgtm
4 years, 4 months ago (2016-08-09 22:12:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2231553002/20001
4 years, 4 months ago (2016-08-09 22:12:25 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/b20283357a09300353dd62962086f3791161e3b8
4 years, 4 months ago (2016-08-09 22:13:21 UTC) #14
reed1
if you're right, and most of the gain is from inlining, perhaps we should try ...
4 years, 4 months ago (2016-08-10 12:01:47 UTC) #15
mtklein
On 2016/08/10 12:01:47, reed1 wrote: > if you're right, and most of the gain is ...
4 years, 4 months ago (2016-08-10 13:18:58 UTC) #16
mtklein
4 years, 4 months ago (2016-08-10 14:32:12 UTC) #17
Message was sent while issue was closed.
On 2016/08/10 13:18:58, mtklein wrote:
> On 2016/08/10 12:01:47, reed1 wrote:
> > if you're right, and most of the gain is from inlining, perhaps we should
try
> > that same technique on SkTDArray itself, to try to speed it up too.
> 
> agreed

I took a quick look a this.  SkTDArray has too many methods that call into each
other to make this an easy task.  If it's important we can do it sometime, but
it's not trivial.

Powered by Google App Engine
This is Rietveld 408576698