-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
15× slowdown in Chrome when DevTools is open #10
Comments
Repro with splits for each of the 4 operations: https://garron.net/temp/age-perf I just figured something out moments ago: the performance slowdown in Chrome happens only when I have DevTools open. When DevTools is closed, the results are nearly in line with other browsers. |
Apparently this is a known https://bugs.chromium.org/p/chromium/issues/detail?id=1322417 15× is rather extreme, and the only reason I was able to find that bug is because of my experience looking up bugs as a Chrome developer. I understand that most devs would expect DevTools functionality over maximum performance, but this seems like it would still be a nasty surprise/source of confusion for anyone using the library without being aware of the caveat. (SEE EDIT) In fact, this makes |
According to https://bugs.chromium.org/p/chromium/issues/detail?id=1322417 the main culprit seems to be WASM. Having a pure JS implementation (as suggested in #20) might mitigate this. |
I ran the following code in the major browsers,
node
, andbun
:(This is just the passphrase example from the README with two lines added to measure duration.)
All on macOS 14.0 using M1 Max:
node
: ≈1000msbun
: ≈1000msThis is "only" 4 orders of magnitude in terms of the work factor, but I'd love to figure out what's going on in Chrome.
The text was updated successfully, but these errors were encountered: