[webkit-reviews] review granted: [Bug 186820] Reduce size of WebCore::URL : [Attachment 344878] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 12 14:14:50 PDT 2018
youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 186820: Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820
Attachment 344878: Patch
https://bugs.webkit.org/attachment.cgi?id=344878&action=review
--- Comment #20 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 344878
--> https://bugs.webkit.org/attachment.cgi?id=344878
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=344878&action=review
> Source/WebCore/platform/URL.cpp:461
> + URLParser parser(m_string.left(m_hostEnd) + m_string.substring(m_hostEnd
+ m_portLength));
That is not great to create three strings here.
Could we try to use StringViews instead of left and substring?
> Source/WebCore/platform/URL.cpp:473
> + URLParser parser(makeString(m_string.left(portStart), (colonNeeded ? ":"
: ""), String::number(i), m_string.substring(m_hostEnd + m_portLength)));
Ditto here.
> Source/WebCore/platform/URL.cpp:513
> + builder.append(m_string.substring(m_hostEnd + m_portLength));
I believe StringBuilder is taking StringView as input.
More information about the webkit-reviews
mailing list