[Webkit-unassigned] [Bug 237789] New: Web worker JS is too slow as compared to chrome

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 11 10:50:04 PST 2022


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

            Bug ID: 237789
           Summary: Web worker JS is too slow as compared to chrome
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Intel)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tasnimrock2k6 at gmail.com

I am building a web app that relies on wasm + pthread (i.e. web workers) and noticed that it was super slow in safari as compared to chrome (nearly 10x slower). The issue could have been in wasm or web-worker but it seems its just the web worker being too slow in safari.

I ran following simple loop iterations in 3 browsers: safari, mozilla (98.0 (64-bit)) & chrome (99.0.4844.51, x86_64) and have the following results -

10^8 loop iteration:
chrome: ~100ms
safari: ~1.9 seconds
firefox: ~107 ms

10^9 loop iterations:
chrome: ~710ms
safari: ~17.99 seconds
firefox: ~969 ms

Repro steps:
Code: https://jsfiddle.net/9gfjo207/7/ - try to save the html file (call it: index.html) and JS (as worker.js) in one directory and run a python sever from terminal on the same directory (python3 -m http.server) and type in browser: localhost:8000/index.html. Keep the developer console opened and type: startWorker() and notice the above results in different browsers.

-- 
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/20220311/795902c4/attachment.htm>


More information about the webkit-unassigned mailing list