-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Recent performance regressions #39413
Comments
That's ... Bizarre. |
Additionally, I noticed that the wpt url benchmarks are showing regressions as well, which is even more bizarre. For example this specific benchmark:
I used a larger |
O.o .... ooooh-kay. Just a thought, but maybe it's not impacting We can test that possibility by making the additional imports in |
I'm wondering if it's something to do with the snapshot. I've tried to whittle the issue down by process of elimination and what I've found in one particular instance is that if I comment out: const {
ReadableStream,
isReadableStream,
} = require('internal/webstreams/readablestream');
const {
WritableStream,
isWritableStream,
} = require('internal/webstreams/writablestream'); in internal/webstreams/adapters.js and comment out: const {
readableStreamCancel,
} = require('internal/webstreams/readablestream'); in internal/fs/promises.js and I have internal/webstreams/util.js only export at most 12 values, then the performance comes back. If I uncomment any of the lines in the previous files or I add any one extra export (it doesn't seem to matter which one) in internal/webstreams/util.js, the performance drops again. |
My hunch was right. If I compile without the snapshot, the performance bounces back (almost nearly). With the snapshot, I get the slow performance again. I wonder if we're hitting some kind of snapshot size limit that causes built-in code to take a performance hit? |
/cc @joyeecheung maybe you can help shed some light on this as you've done some work on snapshots? |
Neither fs/promises.js nor the webstream modules are included in the snapshot (tips: use |
@joyeecheung Running the same loops before |
I can't test including However, running the benchmark after simply adding |
@mscdex That is a known bug being addressed in https://chromium-review.googlesource.com/c/v8/v8/+/2988830 |
Version
master
Platform
Linux foo 5.4.0-58-generic #64~18.04.1-Ubuntu SMP Wed Dec 9 17:11:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
stream
What steps will reproduce the bug?
No response
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
6cd12be for some reason is causing a noticeable performance regression for
stream.Readable
.For example, before that commit:
gives ~815 ops/s on my machine. With that commit I get ~640 ops/s. I don't quite entirely understand why
stream.Readable
is affected here as it's not being changed in that commit, so it could be something V8-related. I did notice in the profiler output with the commit shows a lot more GC activity than before the commit for some reason./cc @jasnell
The text was updated successfully, but these errors were encountered: