Avoid redundant calls to findHTTPHeaderName().
Created attachment 457127 [details] Patch
Comment on attachment 457127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457127&action=review > Source/WebCore/ChangeLog:3 > + Avoid redundant calls to findHTTPHeaderName() Can some of this be changed to use StringView later?
(In reply to Darin Adler from comment #2) > Comment on attachment 457127 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=457127&action=review > > > Source/WebCore/ChangeLog:3 > > + Avoid redundant calls to findHTTPHeaderName() > > Can some of this be changed to use StringView later? What part? findHTTPHeaderName() already takes a Stringview: Source/WebCore/platform/network/create-http-header-name-table:bool findHTTPHeaderName(StringView stringView, HTTPHeaderName& headerName)
Committed r292692 (249484@main): <https://commits.webkit.org/249484@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457127 [details].
<rdar://problem/91540482>
Comment on attachment 457127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457127&action=review >>> Source/WebCore/ChangeLog:3 >>> + Avoid redundant calls to findHTTPHeaderName() >> >> Can some of this be changed to use StringView later? > > What part? findHTTPHeaderName() already takes a Stringview: > Source/WebCore/platform/network/create-http-header-name-table:bool findHTTPHeaderName(StringView stringView, HTTPHeaderName& headerName) For example, setHTTPHeaderField and addHTTPHeaderField. It requires making arguments into String if they aren’t known HTTP header names, but do those String objects get kept around? It’s good we don’t do it with string literals, but what about other sources of strings? And what about the value? Does it get stored as a String or some other way? I think there are still extra String involved in those functions.