Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
stream: refactor to use more primordials#36346
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
mscdex left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes result in performance regressions:
confidence improvement accuracy (*) (**) (***) streams/creation.js kind='duplex' n=50000000 *** -20.52 % ±1.74% ±2.32% ±3.03% streams/creation.js kind='readable' n=50000000 *** -2.90 % ±1.60% ±2.14% ±2.79% streams/creation.js kind='transform' n=50000000 *** -40.53 % ±2.19% ±2.94% ±3.87% streams/creation.js kind='writable' n=50000000 *** -17.87 % ±2.23% ±2.97% ±3.87% streams/readable-bigunevenread.js n=1000 *** 36.67 % ±9.91% ±13.19% ±17.18% streams/readable-unevenread.js n=1000 *** -53.23 % ±1.50% ±2.00% ±2.60% streams/writable-manywrites.js len=1024 callback='no' writev='no' sync='no' n=2000000 *** -8.27 % ±0.93% ±1.24% ±1.61% streams/writable-manywrites.js len=1024 callback='no' writev='yes' sync='no' n=2000000 *** -15.26 % ±2.33% ±3.13% ±4.12% streams/writable-manywrites.js len=1024 callback='yes' writev='no' sync='no' n=2000000 *** -5.86 % ±1.13% ±1.51% ±1.97% streams/writable-manywrites.js len=1024 callback='yes' writev='yes' sync='no' n=2000000 *** -11.91 % ±1.70% ±2.27% ±2.98% streams/writable-manywrites.js len=32768 callback='no' writev='no' sync='no' n=2000000 *** -3.08 % ±1.55% ±2.07% ±2.69% streams/writable-manywrites.js len=32768 callback='no' writev='yes' sync='no' n=2000000 *** -5.16 % ±2.19% ±2.92% ±3.82% mscdex commented Dec 2, 2020
Perhaps we should stop using |
benjamingr commented Dec 2, 2020
@mcollina does this introduce concerns for |
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll deal with it somehow in readable-stream. This ship has sailed long ago.
(Note that using so many primordials will cause problems in jest).
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actuall no, this should not land given the perf regressions. Good spot @mscdex!
Uh oh!
There was an error while loading. Please reload this page.
5691ce5 to 1ea7378Compare This comment has been minimized.
This comment has been minimized.
aduh95 commented Dec 27, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@mscdex@mcollina I've spotted what changes where causing the perf regressions and I've revert them. I think this is ready to land now PTAL. Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/808/ Benchmark results |
nodejs-github-bot commented Dec 27, 2020
c96d03a to 8015a72Compareaduh95 commented Jan 2, 2021
Another benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/847/ Details |
aduh95 commented Jan 5, 2021
Dismissing for unresponsiveness.
aduh95 commented Jan 11, 2021
@mcollina@mscdex I've dismissed the change requests as I believe I've addressed your objections already and my pings haven't received any response in more than seven days. If you want to have another look to give this PR a green mark or want to clarify you are still objecting, you're of course welcome to do so :) |
8015a72 to b93fda8Comparenodejs-github-bot commented Feb 1, 2021
nodejs-github-bot commented Feb 1, 2021
Uh oh!
There was an error while loading. Please reload this page.
RaisinTen commented Feb 1, 2021
node/lib/internal/streams/buffer_list.js Lines 82 to 83 in c746c40
Should we use StringPrototypeSlice here too? |
aduh95 commented Feb 1, 2021
That's what I did originally and I reverted it in b93fda8 for performance reason. |
Uh oh!
There was an error while loading. Please reload this page.
mcollina commented Feb 1, 2021
RaisinTen commented Feb 1, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
|
aduh95 commented Feb 1, 2021
I've already ran a benchmark CI for #37126 which does include the changes in this PR and got acceptable results, see #37126 (comment). I don't think it's necessary to run another benchmark, and I'd be happy to skip it if people in this thread agree. |
nodejs-github-bot commented Feb 1, 2021
benjamingr left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking - just pointing out that the reason this is taking you long to land is that the streams people (me included) don't feel as strongly about the primordial stuff as they do about not breaking the ecosystem (since everything builds on streams) and this PR has breakage potential.
Just writing it down so you don't think you are being ignored - these sort of changes are just very scary (in terms of potential breakage) and somewhat complicate the code.
❤️
nodejs-github-bot commented Feb 1, 2021
nodejs-github-bot commented Feb 1, 2021
PR-URL: nodejs#36346 Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
f72fa25 to 419686cCompareaduh95 commented Feb 1, 2021
Landed in 419686c @benjamingr Thanks for your message! I understand the concerns, and I'm willing to work to help solve any breakage that might arise from these changes. |
mcollina commented Feb 1, 2021
I don't think this should have been landed without a @nodejs/streams approval. We must check if this causes any regressions and consider a revert. I've added a bunch of dont-land tags so we can investigate before backporting. |
mcollina commented Feb 1, 2021
What do you think @nodejs/tsc? |
mcollina commented Feb 1, 2021
CITGM of master: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2606/ |
aduh95 commented Feb 1, 2021
I've opened a revert PR here #37168, we can run benchmarks on top of it to test the impact of this PR. FWIW I've run several benchmarks myself to remove all changes that was causing perf regressions and I've removed those in b93fda8. There is also a recent benchmark CI that was run and didn't show any significant perf regression (https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/913/). |
benjamingr commented Feb 1, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I'm confused, did benchmarks not run after the last changes here? Edit: I think they did run "on top" of it in https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/913/ |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes