JS execution substantially faster when profiling on M1
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
People
(Reporter: elmdominic, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Steps to reproduce:
(1) Visit https://stackblitz.com/edit/node-nyprdd
(2) Wait for the dependencies to be automatically installed
(3) Then run the following command from the terminal at the bottom
time pnpm -F @vitejs/plugin-vue-jsx -F @vitejs/plugin-vue -F @vitejs/plugin-legacy -F @vitejs/plugin-react run dev
Actual results:
Running the command takes ~48s on my machine to build the packages.
Expected results:
The command should finish in < 10s on any architecture / OS.
If you open DevTools -> Performance and "Start recording" it's a lot faster and the command finishes in ~6s.
This issue cannot be reproduced on Linux amd64, or Windows and seems to be specific to arm64.
The command uses Wasm threads under the hood and this may be an issue with Wasm threads on arm.
Also see https://bugs.chromium.org/p/chromium/issues/detail?id=1228686#c26. This is a similar issue that only affects Chrome (V8) and Firefox (Spidermonkey) and cannot be reproduced on Safari (now that it supports Wasm threads).
I have reported this issue for Chrome already https://bugs.chromium.org/p/chromium/issues/detail?id=1356099
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
This sounds like a wasm issue, moving components. We're currently investigating something similar in bug 1809189. Not marking these as duplicates yet until we know more.
Comment 3•2 years ago
|
||
The patch I hacked up for bug 1809189 fixes this issue as well. Going to close this as a duplicate.
Description
•