[Webkit-unassigned] [Bug 259517] New: Consider parsing & analyzing JS in parallel for ES modules?

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 25 20:34:00 PDT 2023


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

            Bug ID: 259517
           Summary: Consider parsing & analyzing JS in parallel for ES
                    modules?
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jarred at jarredsumner.com

Since ESM has promises, code can be fetched and parsed in parallel. In theory, the lexing step could happen on another thread for top-level imports which are statically known. This can become tasks scheduled with JSC::DeferredWorkTimer. I imagine the linking step cannot be done in parallel, but the JSC::Lexer/JSC::Parser steps probably could be parallelized relatively efficiently? If this was already considered/obviously wouldn't work/would be very hard to do no worries but I wanted to draw attention to this potential performance optimization in the unlikely case it hadn't been considered before. The granularity I'm suggesting is per-module. I imagine it won't have a positive impact if there is only one module, but if there are multiple imports, in theory it could be good so long as those files all successfully evaluate

-- 
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/20230726/e494b953/attachment.htm>


More information about the webkit-unassigned mailing list