Chromium Code Reviews
DescriptionUse an inline capacity for CSSTokenizer's Vector<CSSParserToken>
This patch adds an inline capacity of 32 to CSSTokenizer's vector of
parser tokens. This improves performance of parsing short pieces of CSS,
for example setting inline styles, as we don't need to allocate memory
for this vector. The capacity of 32 is chosen arbitrarily to accomodate
most uses of inline styles (we reserve an initial capacity of length/3).
This patch makes setting inline transforms to strings that miss the fast
path ~2% faster on my z620. Note that this is not a reliable testing
device, but we still expect that this optimisation improves performance.
BUG=619498
Committed: https://crrev.com/7d18ae343a06b83d460ee4084fa2f5bc0f1e4acf
Cr-Commit-Position: refs/heads/master@{#399426}
Patch Set 1 #
Messages
Total messages: 14 (5 generated)
|
||||||||||||||||||||||||||||