Skip to content

stream: avoid unnecessary drain for sync stream - #50014

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
nxtedition:drain-sync
Oct 4, 2023
Merged

stream: avoid unnecessary drain for sync stream#50014
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
nxtedition:drain-sync

Conversation

@ronag

@ronagronag commented Oct 2, 2023

Copy link
Copy Markdown
Member

We have tried this before but reverted due to:

2868f52
#35926

However, it has quite a significant performance improvement and doesn't actually break the "streams spec". Let's have another look at it.

streams/writable-manywrites.js len=1024 callback='no' writev='no' sync='no' n=100000 *** 7.14 % ±2.24% ±2.98% ±3.90%
streams/writable-manywrites.js len=1024 callback='no' writev='no' sync='yes' n=100000 ** 4.12 % ±2.47% ±3.29% ±4.28%
streams/writable-manywrites.js len=1024 callback='no' writev='yes' sync='no' n=100000 *** 6.89 % ±2.21% ±2.94% ±3.84%
streams/writable-manywrites.js len=1024 callback='no' writev='yes' sync='yes' n=100000 *** 10.73 % ±2.25% ±3.00% ±3.90%
streams/writable-manywrites.js len=1024 callback='yes' writev='no' sync='no' n=100000 *** 8.46 % ±2.40% ±3.21% ±4.23%
streams/writable-manywrites.js len=1024 callback='yes' writev='no' sync='yes' n=100000 ** 3.00 % ±1.86% ±2.49% ±3.27%
streams/writable-manywrites.js len=1024 callback='yes' writev='yes' sync='no' n=100000 *** 7.99 % ±4.00% ±5.34% ±6.99%
streams/writable-manywrites.js len=1024 callback='yes' writev='yes' sync='yes' n=100000 *** 9.51 % ±5.19% ±6.97% ±9.20%
streams/writable-manywrites.js len=32768 callback='no' writev='no' sync='no' n=100000 *** 7.11 % ±2.05% ±2.73% ±3.55%
streams/writable-manywrites.js len=32768 callback='no' writev='no' sync='yes' n=100000 *** 233.76 % ±6.96% ±9.35% ±12.37%
streams/writable-manywrites.js len=32768 callback='no' writev='yes' sync='no' n=100000 *** 6.40 % ±1.06% ±1.42% ±1.85%
streams/writable-manywrites.js len=32768 callback='no' writev='yes' sync='yes' n=100000 *** 215.94 % ±4.96% ±6.66% ±8.79%
streams/writable-manywrites.js len=32768 callback='yes' writev='no' sync='no' n=100000 *** 6.51 % ±1.51% ±2.01% ±2.61%
streams/writable-manywrites.js len=32768 callback='yes' writev='no' sync='yes' n=100000 *** 213.41 % ±3.75% ±5.01% ±6.57%
streams/writable-manywrites.js len=32768 callback='yes' writev='yes' sync='no' n=100000 *** 5.80 % ±1.54% ±2.06% ±2.69%
streams/writable-manywrites.js len=32768 callback='yes' writev='yes' sync='yes' n=100000 *** 194.75 % ±4.29% ±5.77% ±7.62%

@ronagronag added the semver-major PRs that contain breaking changes and should be released in the next major version. label Oct 2, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 2, 2023
@ronag
ronag requested a review from lpincaOctober 2, 2023 12:27
@ronagronag added the needs-citgm PRs that need a CITGM CI run. label Oct 2, 2023
@ronag

This comment was marked as outdated.

@ronag
ronagforce-pushed the drain-sync branch 6 times, most recently from 926e815 to e384e57CompareOctober 2, 2023 12:44
@ronagronag removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Oct 2, 2023
@ronagronag added request-ci Add this label to start a Jenkins CI on a PR. and removed needs-citgm PRs that need a CITGM CI run. labels Oct 2, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag

ronag commented Oct 3, 2023

Copy link
Copy Markdown
MemberAuthor

@mcollina PTAL

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, clever

@ronagronag added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 3, 2023

@benjamingrbenjamingr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised Matteo is unconcerned with this :D

@lpinca

lpinca commented Oct 3, 2023

Copy link
Copy Markdown
Member

@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 4, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 557044a into nodejs:mainOct 4, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 557044a

ronag added a commit to nxtedition/node that referenced this pull request Oct 28, 2023
nodejs-github-bot pushed a commit that referenced this pull request Oct 29, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #50014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request Nov 11, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@targostargos mentioned this pull request Nov 12, 2023
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Refs: #50014
PR-URL: #50446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#50014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ronag@nodejs-github-bot@mcollina@lpinca@benjamingr