CachedResourceLoader::allCachedSVGImages() reparses resource URLs unnecessarily: Sample Count, Samples %, Normalized CPU %, Symbol 40, 0.1%, 0.0%, WebCore::CachedResourceLoader::allCachedSVGImages() const (in WebCore) 34, 0.1%, 0.0%, WebCore::CachedResourceLoader::cachedResource(WTF::String const&) const (in WebCore) 31, 0.1%, 0.0%, WebCore::Document::completeURL(WTF::String const&, WebCore::ScriptExecutionContext::ForceUTF8) const (in WebCore) 31, 0.1%, 0.0%, WebCore::Document::completeURL(WTF::String const&, WTF::URL const&, WebCore::ScriptExecutionContext::ForceUTF8) const (in WebCore) 30, 0.0%, 0.0%, WTF::URL::URL(WTF::URL const&, WTF::String const&, WTF::URLTextEncoding const*) (in JavaScriptCore) 30, 0.0%, 0.0%, WTF::URLParser::URLParser(WTF::String const&, WTF::URL const&, WTF::URLTextEncoding const*) (in JavaScriptCore) 29, 0.0%, 0.0%, void WTF::URLParser::parse<unsigned char>(unsigned char const*, unsigned int, WTF::URL const&, WTF::URLTextEncoding const*) (in JavaScriptCore)
Created attachment 452790 [details] Patch
Stopped https://ews-build.webkit.org/#/builders/70/builds/974, the 3 failures seen are already known.
(In reply to Jonathan Bedard from comment #2) > Stopped https://ews-build.webkit.org/#/builders/70/builds/974, the 3 > failures seen are already known. Oh, thank you for letting me know! My patch touches SVG and the 3 failures were on SVG tests so I was about to investigate.
Comment on attachment 452790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452790&action=review > Source/WebCore/ChangeLog:10 > + Store URLs in the HashMaps instead of Strings since we have URLs initially and we > + need URLs eventually. This avoids having to re-parse the URL unnecessarily, which > + is fairly expensive. It also makes the maps bigger; URLs share the strings, but the parsed offsets are separate in each URL. Hope that extra memory use is OK.
Committed r290341 (247661@main): <https://commits.webkit.org/247661@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 452790 [details].
<rdar://problem/89326498>