DescriptionRuleSet 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 #
Messages
Total messages: 10 (0 generated)
|