Chromium Code Reviews
DescriptionAdd inline capacity to CSSTokenizer::m_blockStack.
The malloc on the m_blockStack shows up in profiles in Animometer when
parsing transforms since we push and pop from this stack for every
paren and transforms use function syntax like rotate(10deg). We can
instead use inline capacity to skip the malloc when parsing many inline
transforms, variables, or other things that use parens.
I chose 8 since it's unlikely that you'd nest more than 8 parens,
brackets or braces in CSS. We can easily make this number bigger someday
too since CSSParserTokenType is just an enum so the storage is very
small.
BUG=605792
Committed: https://crrev.com/53ab0155b7a113df1fcbeb1050df6fea27581685
Cr-Commit-Position: refs/heads/master@{#402401}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Fix typo. #
Messages
Total messages: 15 (7 generated)
|
||||||||||||||||||||||||||||