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

Issue 2290543002: Avoid redundant hash calculations in CustomElementUpgradeSorter (Closed)

Created:
4 years, 3 months ago by kochi
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, eae+blinkwatch, rwlbuis, sof, webcomponents-bugzilla_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid redundant hash calculations in CustomElementUpgradeSorter Pointed out by tkent in https://codereview.chromium.org/2242743002/ The original code could do 2 hash calculations for adding a new key-value pair to ParentChildMap (for find() and add()), and rehashing the map may involve copying the HeapHashSet<Member<Node>> objects. Change the value part of ParentChildMap from a HeapHashMap object to its pointer, to avoid redundant hash calculation and object copy. This does not change any functionality of the class. BUG=594918 Committed: https://crrev.com/130931a943430f64f69dfb238571d74762f84160 Cr-Commit-Position: refs/heads/master@{#415251}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -16 lines) Patch
M third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp View 3 chunks +16 lines, -15 lines 0 comments Download

Messages

Total messages: 19 (12 generated)
kochi
Hi Dominic, This was pointed out by tkent @ https://codereview.chromium.org/2242743002/diff/490001/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp#newcode42 which was in the original ...
4 years, 3 months ago (2016-08-29 07:35:09 UTC) #6
dominicc (has gone to gerrit)
On 2016/08/29 at 07:35:09, kochi wrote: > Hi Dominic, > > This was pointed out ...
4 years, 3 months ago (2016-08-30 02:27:26 UTC) #9
kochi
Thanks for the review! I updated the description. Could you take another look?
4 years, 3 months ago (2016-08-30 04:40:46 UTC) #12
dominicc (has gone to gerrit)
lgtm Very nice!
4 years, 3 months ago (2016-08-30 07:01:40 UTC) #14
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/2290543002/1
4 years, 3 months ago (2016-08-30 07:01:57 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-08-30 09:09:37 UTC) #17
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 09:10:56 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/130931a943430f64f69dfb238571d74762f84160
Cr-Commit-Position: refs/heads/master@{#415251}

Powered by Google App Engine
This is Rietveld 408576698