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

Issue 2463703002: Optimize KURL protocols (Closed)

Created:
4 years, 1 month ago by Charlie Harrison
Modified:
4 years ago
Reviewers:
esprehn
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize KURL protocols This patch optimizes KURL::protocol and KURL::protocolIs by keeping an AtomicString m_protocol on KURL. This reduces string allocations throughout the code using KURL::protocol(). This also fixes an inconsistency with KURL::protocolIs that will return true for invalid URLs. BUG=348655 Committed: https://crrev.com/775abc2d7c903f191f7b24f8b299ebabbea3f624 Cr-Commit-Position: refs/heads/master@{#438197}

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : more clean up #

Patch Set 4 : 16 bit test #

Total comments: 3

Patch Set 5 : clean up patch #

Patch Set 6 : Avoid hashing for http/https, add atoms, etc. #

Patch Set 7 : sync to #430381 #

Patch Set 8 : simplify #

Total comments: 7

Patch Set 9 : add dchecks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -79 lines) Patch
M third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.cpp View 1 2 3 4 5 6 7 8 14 chunks +42 lines, -60 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURLTest.cpp View 1 2 3 4 5 6 7 2 chunks +15 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/AtomicString.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringStatics.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (45 generated)
Charlie Harrison
esprehn, this has less win than the string hashing CL, but it's a good step ...
4 years, 1 month ago (2016-11-03 12:52:33 UTC) #14
esprehn
I think something is missing in this patch? Your string is not atomic and you're ...
4 years, 1 month ago (2016-11-04 23:48:32 UTC) #17
Charlie Harrison
Sorry, let me re-upload the patch. https://codereview.chromium.org/2463703002/diff/60001/third_party/WebKit/Source/platform/weborigin/KURL.cpp File third_party/WebKit/Source/platform/weborigin/KURL.cpp (right): https://codereview.chromium.org/2463703002/diff/60001/third_party/WebKit/Source/platform/weborigin/KURL.cpp#newcode788 third_party/WebKit/Source/platform/weborigin/KURL.cpp:788: m_protocol = (m_protocol); ...
4 years, 1 month ago (2016-11-04 23:58:36 UTC) #18
Charlie Harrison
So, here's the updated patch with a few changes. - I've added http/https atoms, and ...
4 years, 1 month ago (2016-11-07 23:02:52 UTC) #31
Charlie Harrison
esprehn: would you take another look at this? Another benefit here is we avoid doing ...
4 years ago (2016-12-12 19:15:16 UTC) #42
esprehn
Are you sure this is right? The old code ignored case, and the new code ...
4 years ago (2016-12-12 22:18:46 UTC) #43
Charlie Harrison
I think this should be OK. In general we want protocol comparisons to be case ...
4 years ago (2016-12-12 22:26:07 UTC) #44
esprehn
lgtm
4 years ago (2016-12-12 23:19:48 UTC) #45
Charlie Harrison
Many thanks for the review. I've just cleaned things up slightly and added a few ...
4 years ago (2016-12-13 16:03:22 UTC) #48
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/2463703002/160001
4 years ago (2016-12-13 16:04:01 UTC) #52
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-13 17:11:16 UTC) #55
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/775abc2d7c903f191f7b24f8b299ebabbea3f624 Cr-Commit-Position: refs/heads/master@{#438197}
4 years ago (2016-12-13 17:12:40 UTC) #57
Charlie Harrison
4 years ago (2016-12-20 04:16:24 UTC) #58
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:160001) has been created in
https://codereview.chromium.org/2586253004/ by csharrison@chromium.org.

The reason for reverting is: Causing DCHECK flakes. crbug.com/674388.

Powered by Google App Engine
This is Rietveld 408576698