Clean up / optimize ResourceResponse::platformLazyInit(InitLevel).
Created attachment 281388 [details] Patch
Created attachment 281392 [details] Patch
Created attachment 281403 [details] Patch
Created attachment 281408 [details] Patch
Comment on attachment 281408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281408&action=review > Source/WebCore/platform/network/HTTPParsers.h:81 > +AtomicString extractReasonPhraseFromHTTPStatusLine(const String&); I suggest changing the argument from const String& to StringView. > Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm:171 > + CFHTTPMessageRef messageRef = CFURLResponseGetHTTPResponse([httpResponse _CFURLResponse]); I suggest using auto here. > Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm:174 > + RetainPtr<CFDictionaryRef> headers = adoptCF(CFHTTPMessageCopyAllHeaderFields(messageRef)); I suggest using auto for the result of adoptCF. > Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm:179 > + CFStringRef value; > + if (CFDictionaryGetValueIfPresent(headers.get(), commonHeader, (const void **)&value)) > + headersMap.set(commonHeader, value); I suggest using const void* as the type of the local variable and doing the typecast when calling set.
Comment on attachment 281408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281408&action=review >> Source/WebCore/platform/network/HTTPParsers.h:81 >> +AtomicString extractReasonPhraseFromHTTPStatusLine(const String&); > > I suggest changing the argument from const String& to StringView. I tried doing this but the issue was that the call sites have a CFStringRef (not a String). StringView does not have a constructor that takes a CFStringRef so using StringView here would force the call sites to explicitly construct a String.
Created attachment 281424 [details] Patch
Created attachment 281427 [details] Patch
Created attachment 281430 [details] Patch
Committed r202121: <http://trac.webkit.org/changeset/202121>
Looks like this may have been a 1% PLT progression on MacBookPro, working on confirming.
(In reply to comment #11) > Looks like this may have been a 1% PLT progression on MacBookPro, working on > confirming. Confirmed progression on PLT.