[Webkit-unassigned] [Bug 271610] Web Inspector: Generating JS builtins for createInspectorInjectedScript is very slow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 2 21:41:55 PDT 2024


--- Comment #10 from Karl Dubost <karlcow at apple.com> ---
If I remove the wrapper, the gain in speed is huge.

The wrapper is:
function createInspectorInjectedScript(InjectedScriptHost, inspectedGlobalObject, injectedScriptId)
{ }

so with Source/JavaScriptCore/Scripts/wkbuiltins/builtins_model.py

        functionStrings = [text[start:end].strip() for (start, end) in functionBounds]
        import time
        tic = time.perf_counter()
        thingtoreturn = list(map(BuiltinFunction.fromString, functionStrings))
        toc = time.perf_counter()
        print(f"how long for BuiltinFunction.fromString: {toc - tic:0.8f}s")
        return thingtoreturn

% python3 Source/JavaScriptCore/Scripts/generate-js-builtins.py --framework JavaScriptCore --output-directory /tmp/ --combined Source/JavaScriptCore/inspector/InjectedScriptSource.js

how long for BuiltinFunction.fromString:
with    wrapper: 15.52224183s
without wrapper:  0.08558171s

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240403/12e9b777/attachment-0001.htm>

More information about the webkit-unassigned mailing list