DescriptionOptimize WebURL -> GURL conversions
When rendering sina.com.cn, we spend 5% of our total time converting between
WebURL and GURL. Prior to this CL, the conversion involved a number of copies:
1) From the String to a temporary buffer in String::utf8.
2) From the temporary buffer to a CString.
3) From the CString to a std::string.
After this CL, we are able to copy directly from the String into the GURL.
Instead of WebURL storing the spec in a CString, we now store the spec as a
String, which lets WebURL simply ref the same buffer used by KURL. When
building the GURL, we copy directly out of the String (assume it's ASCII, which
is usually the case for canonicalized URLs) into a temporary std::string, which
we move all the way into the GURL.
R=jyasskin@chromium.org
BUG=261412
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155006
Patch Set 1 #
Total comments: 4
Patch Set 2 : Fix logic #
Total comments: 3
Patch Set 3 : Remove operator< #
Total comments: 2
Patch Set 4 : Hijack WebString::utf8 #Patch Set 5 : Rebase #
Messages
Total messages: 17 (0 generated)
|