FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: improve writable.write() performance by mscdex · Pull Request #31624 · nodejs/node · GitHub

/ node Public

stream: improve writable.write() performance - #31624

Merged
mscdex merged 2 commits into
nodejs:masterfrom
mscdex:stream-writable-write-perf
Feb 9, 2020
Merged

stream: improve writable.write() performance#31624
mscdex merged 2 commits into
nodejs:masterfrom
mscdex:stream-writable-write-perf

Conversation

mscdex commented Feb 3, 2020
edited
Loading

Copy link
Copy Markdown
Contributor

Benchmark results:

                                                                                   confidence improvement accuracy (*)   (**)  (***)
 streams/writable-manywrites.js callback='no' writev='no' sync='no' n=40000000                    0.72 %       ±1.42% ±1.89% ±2.46%
 streams/writable-manywrites.js callback='no' writev='no' sync='yes' n=40000000          ***      2.82 %       ±0.54% ±0.72% ±0.94%
 streams/writable-manywrites.js callback='no' writev='yes' sync='no' n=40000000                   1.04 %       ±1.11% ±1.47% ±1.92%
 streams/writable-manywrites.js callback='no' writev='yes' sync='yes' n=40000000         ***      3.18 %       ±0.69% ±0.92% ±1.20%
 streams/writable-manywrites.js callback='yes' writev='no' sync='no' n=40000000                  -0.39 %       ±1.56% ±2.09% ±2.73%
 streams/writable-manywrites.js callback='yes' writev='no' sync='yes' n=40000000         ***      7.03 %       ±0.83% ±1.11% ±1.45%
 streams/writable-manywrites.js callback='yes' writev='yes' sync='no' n=40000000         ***      2.28 %       ±1.06% ±1.41% ±1.83%
 streams/writable-manywrites.js callback='yes' writev='yes' sync='yes' n=40000000        ***      8.46 %       ±0.89% ±1.18% ±1.55%

There is also a change to the benchmark runner to ensure that end() is not called multiple times. This was happening in the Writable benchmark and was at least causing weird display issues (e.g. improper fraction for # of configs, completion percentage bouncing back and forth, etc.) when using benchmark/compare.js and showing progress.

The reason why that was happening was that process.send() is used to send the result, which is async and gives individual benchmarks time to call .end() again before the process actually exits.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

mscdex added stream Issues and PRs related to the stream subsystem. benchmark Issues and PRs related to the benchmark subsystem. performance Issues and PRs related to the performance of Node.js. labels Feb 3, 2020

Copy link
Copy Markdown
Collaborator

jasnell requested a review from mcollina February 4, 2020 20:14

mcollina 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

addaleax added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 7, 2020

Copy link
Copy Markdown
Collaborator

mscdex force-pushed the stream-writable-write-perf branch 2 times, most recently from 9584701 to dea2b50 Compare February 9, 2020 02:35
PR-URL: nodejs#31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
mscdex force-pushed the stream-writable-write-perf branch from 568dcf0 to 43783b5 Compare February 9, 2020 02:37
mscdex merged commit 43783b5 into nodejs:master Feb 9, 2020
mscdex deleted the stream-writable-write-perf branch February 9, 2020 02:38
codebytere pushed a commit that referenced this pull request Feb 17, 2020
PR-URL: #31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere mentioned this pull request Feb 17, 2020

Copy link
Copy Markdown
Member

@mscdex this needs a manual backport to v13.x - if it shouldn't be feel free to just swap that label out for dont-land!

ronag pushed a commit to nxtedition/node that referenced this pull request Mar 10, 2020
PR-URL: nodejs#31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Backport-PR-URL: nodejs#32169
MylesBorins pushed a commit that referenced this pull request Mar 10, 2020
Backport-PR-URL: #32169
PR-URL: #31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins mentioned this pull request Mar 10, 2020
codebytere pushed a commit that referenced this pull request Mar 15, 2020
PR-URL: #31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
PR-URL: #31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
PR-URL: #31624
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. performance Issues and PRs related to the performance of Node.js. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL