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

Issue 1920583002: NOT FOR LANDING: Hack up CSSParser for speed. (Closed)

Created:
4 years, 8 months ago by esprehn
Modified:
4 years, 6 months ago
Reviewers:
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NOT FOR LANDING: Hack up CSSParser for speed. This saves 18-35% depending on what you're parsing. It totally disables the fast path though which exposes that parsing some things (ex. colors) don't improve with this set of changes, but parsing things like transform when you miss the fast path are quite a lot better. If we left in the fast path that would be bad since it penalizes all callers to .transform = "" that miss the fast path. We should continue to explore more ideas to speed up the parser, if the fast path can parse a color 3x faster today, we totally want that when parsing sheets too and not just when parsing .style.foo assignments. BUG=605792

Patch Set 1 #

Patch Set 2 : missing consts. #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -75 lines) Patch
M third_party/WebKit/Source/core/css/CSSPrimitiveValue.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp View 2 chunks +132 lines, -1 line 3 comments Download
M third_party/WebKit/Source/core/css/CSSVariableData.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSVariableData.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserImpl.h View 1 chunk +1 line, -1 line 1 comment Download
M third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserTokenRange.h View 2 chunks +3 lines, -8 lines 2 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 chunk +2 lines, -2 lines 1 comment Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizer.h View 2 chunks +2 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp View 7 chunks +184 lines, -15 lines 2 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h View 1 3 chunks +31 lines, -12 lines 4 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp View 1 2 chunks +3 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp View 3 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
esprehn
https://codereview.chromium.org/1920583002/diff/20001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp File third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp (right): https://codereview.chromium.org/1920583002/diff/20001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp#newcode90 third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp:90: CSSPrimitiveValue::UnitType toUnitType(CharacterType* chars, unsigned length) This was a very ...
4 years, 8 months ago (2016-04-22 23:30:58 UTC) #3
Timothy Loh
I know this particular CL isn't for landing, but I had comments anyway... https://codereview.chromium.org/1920583002/diff/20001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp File ...
4 years, 8 months ago (2016-04-27 06:52:05 UTC) #4
dglazkov
On 2016/04/27 at 06:52:05, timloh wrote: > This is definitely an improvement (I think using ...
4 years, 7 months ago (2016-04-27 15:51:28 UTC) #5
Timothy Loh
On 2016/04/27 15:51:28, dglazkov wrote: > On 2016/04/27 at 06:52:05, timloh wrote: > > This ...
4 years, 7 months ago (2016-04-28 01:39:57 UTC) #6
esprehn
On 2016/04/28 at 01:39:57, timloh wrote: > On 2016/04/27 15:51:28, dglazkov wrote: > > On ...
4 years, 7 months ago (2016-04-28 01:52:00 UTC) #7
dglazkov
4 years, 7 months ago (2016-04-29 01:28:54 UTC) #8
On 2016/04/28 at 01:39:57, timloh wrote:
> On 2016/04/27 15:51:28, dglazkov wrote:
> > On 2016/04/27 at 06:52:05, timloh wrote:
> > > This is definitely an improvement (I think using code generation to make
the
> > lookup table is just unneeded complexity), but I'm not convinced this will
> > actually make any performance difference.
> > 
> > Didn't Elliott state the factual performance difference in the CL
description?
> > Confused about the "actually make any performance difference" statement.
> 
> Just the particular bit of code the comment was attached to, not the change as
a whole.

D'oh.

Powered by Google App Engine
This is Rietveld 408576698