[webkit-changes] [WebKit/WebKit] 6fb275: [JSC] sourceURLStripped should be cached
Yusuke Suzuki
noreply at github.com
Wed Aug 9 08:45:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6fb27543f7aca3fbef3bf1e18324f829c5294888
https://github.com/WebKit/WebKit/commit/6fb27543f7aca3fbef3bf1e18324f829c5294888
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths:
M Source/JavaScriptCore/parser/SourceProvider.cpp
M Source/JavaScriptCore/parser/SourceProvider.h
M Source/JavaScriptCore/runtime/ScriptExecutable.h
M Source/JavaScriptCore/runtime/StackFrame.cpp
Log Message:
-----------
[JSC] sourceURLStripped should be cached
https://bugs.webkit.org/show_bug.cgi?id=259969
rdar://113616170
Reviewed by Keith Miller.
262420 at main introduced sourceURLStripped for error stack URLs. However this is really costly operation,
as a result, it makes error stack string generation slower. JetStream2/chai-wtb is frequently creating
this error stack string, so this is affected by this change by up to 5%.
This patch fixes the above performance issue by caching sourceURLStripped in SourceProvider.
* Source/JavaScriptCore/parser/SourceProvider.cpp:
(JSC::SourceProvider::sourceURLStripped):
* Source/JavaScriptCore/parser/SourceProvider.h:
* Source/JavaScriptCore/runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::sourceURLStripped const):
* Source/JavaScriptCore/runtime/StackFrame.cpp:
(JSC::processSourceURL):
(JSC::StackFrame::sourceURL const):
(JSC::StackFrame::sourceURLStripped const):
Canonical link: https://commits.webkit.org/266728@main
More information about the webkit-changes
mailing list