WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
237789
Web worker JS is too slow as compared to chrome
https://bugs.webkit.org/show_bug.cgi?id=237789
Summary
Web worker JS is too slow as compared to chrome
tasnim
Reported
2022-03-11 10:50:04 PST
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-03-11 16:44:29 PST
<
rdar://problem/90187513
>
tasnim
Comment 2
2022-03-12 22:25:53 PST
I did a bit more testing. I get different results each time but chrome & safari's time seem similar (at some times safari is even faster than chrome) on my macOS. I don't remember why safari was performing slower before when I initially filed this bug. Please consider this bug as obsolete but would be helpful if anyone can point me to links related to any benchmark done on this. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug