Closed Bug 1809405 Opened 2 years ago Closed 2 years ago

JS execution substantially faster when profiling on M1

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

Firefox 108
defect

Tracking

()

RESOLVED DUPLICATE of bug 1809189

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

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.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
See Also: → 1809189
Severity: -- → S3
Priority: -- → P3

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.

Component: JavaScript Engine → JavaScript: WebAssembly

The patch I hacked up for bug 1809189 fixes this issue as well. Going to close this as a duplicate.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1809189
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.