[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 22:43:35 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=271610

--- Comment #14 from Karl Dubost <karlcow at apple.com> ---
Ok the 3rd one is the nested functionVisibilityRegExp

        # This is ok. No issue
        visibilityMatch = functionVisibilityRegExp.search(function_source)
        if visibilityMatch:
            visibility = visibilityMatch.group(1)
            # This one is costly
            function_source = functionVisibilityRegExp.sub("", function_source)
        elif is_link_time_constant:
            visibility = "Private"


Profiling the code: 

Full Time of execution:

33.5% functionIntrinsicRegExp = re.compile(r".*^@intrinsic=(\w+)", re.MULTILINE | re.DOTALL)
32.8% functionOverriddenNameRegExp = re.compile(r".*^@overriddenName=(\".+\")$", re.MULTILINE | re.DOTALL)
33.7% functionVisibilityRegExp = re.compile(r".*^@visibility=(\w+)", re.MULTILINE | re.DOTALL)

Let's fix this :)

-- 
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/6f41c2fd/attachment.htm>


More information about the webkit-unassigned mailing list