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

Issue 91453002: Speed up GrResourceCache add and lookup by using TDynamicHash (Closed)

Created:
7 years ago by Kimmo Kinnunen
Modified:
6 years, 11 months ago
Reviewers:
mtklein, bsalomon, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Speed up GrResourceCache add and lookup by using TDynamicHash Speed up GrResourceCache add and lookup by using TDynamicHash instead of GrTHashTable. GrTHashTable spends most of its time memmoving the array elements while sorting after an add. Lookup is not particularly fast either. Committed: http://code.google.com/p/skia/source/detail?r=13122

Patch Set 1 #

Total comments: 8

Patch Set 2 : address review comments #

Patch Set 3 : #

Patch Set 4 : add a comment #

Patch Set 5 : #

Total comments: 17

Patch Set 6 : simplify #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : rebase #

Patch Set 12 : rebase to 140753003 #

Total comments: 12

Patch Set 13 : address review comments #

Patch Set 14 : #

Patch Set 15 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -50 lines) Patch
M src/gpu/GrResourceCache.h View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +16 lines, -47 lines 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
A src/gpu/GrTMultiMap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +119 lines, -0 lines 0 comments Download
M tests/ResourceCacheTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Kimmo Kinnunen
Depends on https://codereview.chromium.org/88113002/ Difference to the depends: Desktop: grresourcecache_find GPU 342.32 201.30 +141.02 +41.2% grresourcecache_add ...
7 years ago (2013-11-27 13:32:39 UTC) #1
mtklein
I'm happy to see such a speedup! https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h File src/core/SkTDynamicHash.h (left): https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h#oldcode26 src/core/SkTDynamicHash.h:26: SkASSERT(this->validate()); Please ...
7 years ago (2013-11-27 14:21:54 UTC) #2
Kimmo Kinnunen
Thanks for the review. I'll upload another one. https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h File src/core/SkTDynamicHash.h (left): https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h#oldcode26 src/core/SkTDynamicHash.h:26: SkASSERT(this->validate()); ...
7 years ago (2013-11-28 06:40:07 UTC) #3
bsalomon
https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h File src/core/SkTDynamicHash.h (right): https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h#newcode72 src/core/SkTDynamicHash.h:72: void remove(const T* entry) { On 2013/11/28 06:40:08, kkinnunen ...
7 years ago (2013-12-02 14:18:16 UTC) #4
Kimmo Kinnunen
How about this new patch? It does not change dynamic hash semantics. Some convolution in ...
7 years ago (2013-12-02 14:19:47 UTC) #5
reed1
https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h File src/core/SkTDynamicHash.h (right): https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h#newcode72 src/core/SkTDynamicHash.h:72: void remove(const T* entry) { On 2013/12/02 14:18:16, bsalomon ...
7 years ago (2013-12-02 16:20:39 UTC) #6
bsalomon
On 2013/12/02 16:20:39, reed1 wrote: > https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h > File src/core/SkTDynamicHash.h (right): > > https://codereview.chromium.org/91453002/diff/1/src/core/SkTDynamicHash.h#newcode72 > ...
7 years ago (2013-12-02 16:27:30 UTC) #7
mtklein
I hate to keep asking this sort of thing, but do you see any way ...
7 years ago (2013-12-03 19:02:01 UTC) #8
Kimmo Kinnunen
New one, trying to avoid modifying said files. Removing all a hash table entries should ...
7 years ago (2013-12-05 14:40:27 UTC) #9
Kimmo Kinnunen
On 2013/12/05 14:40:27, kkinnunen wrote: > New one, trying to avoid modifying said files. Ping.. ...
7 years ago (2013-12-16 14:24:58 UTC) #10
mtklein
Sorry it's taken me so long to look at this. I have some nits, but ...
6 years, 11 months ago (2014-01-17 15:08:42 UTC) #11
Kimmo Kinnunen
Thanks for the review. New version is up. Numbers: desktop: grresourcecache_find GPU c 307.54 163.33 ...
6 years, 11 months ago (2014-01-17 17:14:44 UTC) #12
mtklein
Thanks, those new comments really help. lgtm
6 years, 11 months ago (2014-01-17 17:29:00 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/91453002/340001
6 years, 11 months ago (2014-01-17 17:38:27 UTC) #14
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 17:56:32 UTC) #15
Message was sent while issue was closed.
Change committed as 13122

Powered by Google App Engine
This is Rietveld 408576698