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

Issue 17616009: RuleSet should use malloc rather than Vector (Closed)

Created:
7 years, 6 months ago by abarth-chromium
Modified:
7 years, 6 months ago
Reviewers:
ojan, esprehn, eseidel
CC:
blink-reviews, apavlov+blink_chromium.org, dglazkov+blink, eae+blinkwatch, darktears
Visibility:
Public.

Description

RuleSet should use malloc rather than Vector The lion's share of the memory used by the style resolver is in the RuleSet objects. Prior to this CL, these objects were structured as a HashMap from AtomicStrings to pointers to vectors of RuleData. This CL simplifies this object graph by removing a layer of indirection. Now we just have a HashMap from AtomicStrings to an array of RuleDatas. Rather than use a length to terminate the iteration over the Vector, this CL uses a bit in RuleData to mark the end of the array. Together with removing the extra pointer, this CL saves 15 kB on Mobile Gmail. R=eseidel,ojan Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153042

Patch Set 1 #

Patch Set 2 : Make fancy #

Total comments: 14

Patch Set 3 : nit #

Patch Set 4 : Address reviewer feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -61 lines) Patch
M Source/core/css/ElementRuleCollector.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/ElementRuleCollector.cpp View 1 2 3 1 chunk +53 lines, -44 lines 0 comments Download
M Source/core/css/RuleSet.h View 1 2 3 5 chunks +11 lines, -6 lines 0 comments Download
M Source/core/css/RuleSet.cpp View 1 2 3 2 chunks +77 lines, -11 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
abarth-chromium
7 years, 6 months ago (2013-06-25 22:52:15 UTC) #1
abarth-chromium
7 years, 6 months ago (2013-06-25 22:52:51 UTC) #2
abarth-chromium
7 years, 6 months ago (2013-06-26 00:12:15 UTC) #3
eseidel
lgtm
7 years, 6 months ago (2013-06-26 00:26:57 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/17616009/5001
7 years, 6 months ago (2013-06-26 00:27:03 UTC) #5
esprehn
https://codereview.chromium.org/17616009/diff/2001/Source/core/css/ElementRuleCollector.cpp File Source/core/css/ElementRuleCollector.cpp (right): https://codereview.chromium.org/17616009/diff/2001/Source/core/css/ElementRuleCollector.cpp#newcode258 Source/core/css/ElementRuleCollector.cpp:258: collectRuleIfMatches(*rules++, matchRequest, ruleRange); you could maybe do/while {} but ...
7 years, 6 months ago (2013-06-26 00:37:33 UTC) #6
abarth-chromium
https://codereview.chromium.org/17616009/diff/2001/Source/core/css/ElementRuleCollector.cpp File Source/core/css/ElementRuleCollector.cpp (right): https://codereview.chromium.org/17616009/diff/2001/Source/core/css/ElementRuleCollector.cpp#newcode258 Source/core/css/ElementRuleCollector.cpp:258: collectRuleIfMatches(*rules++, matchRequest, ruleRange); On 2013/06/26 00:37:33, esprehn wrote: > ...
7 years, 6 months ago (2013-06-26 00:57:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/17616009/25003
7 years, 6 months ago (2013-06-26 00:58:37 UTC) #8
esprehn
LGTM.
7 years, 6 months ago (2013-06-26 00:58:42 UTC) #9
commit-bot: I haz the power
7 years, 6 months ago (2013-06-26 02:41:02 UTC) #10
Message was sent while issue was closed.
Change committed as 153042

Powered by Google App Engine
This is Rietveld 408576698