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

Issue 2655853003: Replace StringImpl::empty{16Bit}() with a static member (Closed)

Created:
3 years, 11 months ago by Charlie Harrison
Modified:
3 years, 10 months ago
Reviewers:
esprehn
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-wtf_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, mac-reviews_chromium.org, Mikhail, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace StringImpl::empty{16Bit}() with a static member These static method calls have been showing up in profiles, especially for StringView("string literal") construction. This patch eliminates that overhead. BUG=684604 Review-Url: https://codereview.chromium.org/2655853003 Cr-Commit-Position: refs/heads/master@{#447526} Committed: https://chromium.googlesource.com/chromium/src/+/2c3e23286499227cda716bdadd43f8f4ef319cc6

Patch Set 1 #

Total comments: 3

Patch Set 2 : gb #

Patch Set 3 : annotate race #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -54 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutCounter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutWordBreak.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/ThreadingPthreads.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/wtf/ThreadingWin.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 11 chunks +26 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringMac.mm View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/text/StringStatics.cpp View 2 chunks +2 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringView.h View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFStringTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (15 generated)
Charlie Harrison
Hey Elliott, PTAL at this approach. I opted to keep the empties as static members ...
3 years, 11 months ago (2017-01-25 18:10:04 UTC) #4
esprehn
lgtm https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp File third_party/WebKit/Source/wtf/text/WTFString.cpp (right): https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp#newcode789 third_party/WebKit/Source/wtf/text/WTFString.cpp:789: return emptyString; We should probably make these statics ...
3 years, 10 months ago (2017-02-01 05:23:44 UTC) #7
Charlie Harrison
thanks https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp File third_party/WebKit/Source/wtf/text/WTFString.cpp (right): https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp#newcode789 third_party/WebKit/Source/wtf/text/WTFString.cpp:789: return emptyString; On 2017/02/01 05:23:44, esprehn wrote: > ...
3 years, 10 months ago (2017-02-01 05:29:48 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2655853003/1
3 years, 10 months ago (2017-02-01 05:30:12 UTC) #10
esprehn
https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp File third_party/WebKit/Source/wtf/text/WTFString.cpp (right): https://codereview.chromium.org/2655853003/diff/1/third_party/WebKit/Source/wtf/text/WTFString.cpp#newcode789 third_party/WebKit/Source/wtf/text/WTFString.cpp:789: return emptyString; On 2017/02/01 at 05:29:48, Charlie Harrison-slow til ...
3 years, 10 months ago (2017-02-01 05:47:39 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/7076)
3 years, 10 months ago (2017-02-01 06:39:57 UTC) #13
Charlie Harrison
Guessing we need to annotate a benign race, let me try again.
3 years, 10 months ago (2017-02-01 06:46:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2655853003/40001
3 years, 10 months ago (2017-02-01 16:10:56 UTC) #21
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 16:16:04 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2c3e23286499227cda716bdadd43...

Powered by Google App Engine
This is Rietveld 408576698