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

Issue 2006413002: Avoid calling lower() on inline styles in parseKeywordValue. (Closed)

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

Description

Avoid calling lower() on inline styles in parseKeywordValue. We were doing string.lower() on every inline style that was assigned to a non-keyword property to compare the value to "inherit" and "initial". This is wasteful and shows up in profiles, instead lets use equalIgnoringASCIICase. To do this we need to expand the overload set for equalIgnoringASCIICase to include one that takes a const char* so that we don't allocate a temporary String instance when passing a literal. We also inline the call to strlen so that the compiler can figure out the length for us and avoid calling strlen at runtime. This reduces the script execution time of Animometer > Leaves by 1% on my Macbook Pro. BUG=606211 Committed: https://crrev.com/d56e7dd93c7a25a390ebda860dcd17a17533d5f8 Cr-Commit-Position: refs/heads/master@{#395809}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -8 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp View 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 2 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 chunk +1 line, -3 lines 1 comment Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
esprehn
https://codereview.chromium.org/2006413002/diff/1/third_party/WebKit/Source/wtf/text/StringImpl.cpp File third_party/WebKit/Source/wtf/text/StringImpl.cpp (left): https://codereview.chromium.org/2006413002/diff/1/third_party/WebKit/Source/wtf/text/StringImpl.cpp#oldcode2300 third_party/WebKit/Source/wtf/text/StringImpl.cpp:2300: CHECK_LE(length, numeric_limits<unsigned>::max()); This isn't needed, we're not going to ...
4 years, 7 months ago (2016-05-24 22:44:27 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006413002/1
4 years, 7 months ago (2016-05-24 22:45:53 UTC) #3
esprehn
4 years, 7 months ago (2016-05-24 22:47:59 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-25 01:52:40 UTC) #8
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-25 01:52:53 UTC) #9
esprehn
Yukta@ for wtf
4 years, 7 months ago (2016-05-25 03:57:51 UTC) #11
esprehn
On 2016/05/25 at 03:57:51, esprehn wrote: > Yukta@ for wtf yutak*
4 years, 7 months ago (2016-05-25 03:58:19 UTC) #12
Yuta Kitamura
wtf LGTM
4 years, 7 months ago (2016-05-25 04:10:09 UTC) #13
dstockwell
lgtm
4 years, 7 months ago (2016-05-25 05:36:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006413002/1
4 years, 7 months ago (2016-05-25 05:41:26 UTC) #17
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-25 05:44:51 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 05:47:35 UTC) #20
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/d56e7dd93c7a25a390ebda860dcd17a17533d5f8
Cr-Commit-Position: refs/heads/master@{#395809}

Powered by Google App Engine
This is Rietveld 408576698