CSSTokenizer should use inline capacity on the token vectors |
||
Issue descriptionThis is a large performance improvement when parsing inline styles, and cuts script execution time for Animometer. See: https://codereview.chromium.org/1920583002 where this combined with other optimizations got 35% improvement. This should be pretty simple, see the linked patch.
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d18ae343a06b83d460ee4084fa2f5bc0f1e4acf commit 7d18ae343a06b83d460ee4084fa2f5bc0f1e4acf Author: timloh <timloh@chromium.org> Date: Mon Jun 13 10:52:07 2016 Use 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 Review-Url: https://codereview.chromium.org/2058403002 Cr-Commit-Position: refs/heads/master@{#399426} [modify] https://crrev.com/7d18ae343a06b83d460ee4084fa2f5bc0f1e4acf/third_party/WebKit/Source/core/css/parser/CSSParserTokenRange.h [modify] https://crrev.com/7d18ae343a06b83d460ee4084fa2f5bc0f1e4acf/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h
,
Jun 30 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jun 13 2016