GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: some simplification by ronag · Pull Request #32900 · nodejs/node

Conversation

@ronag

@ronag ronag commented Apr 17, 2020

Copy link
Copy Markdown
Member

~7% improvement

NOTE: Contains 2 commits to reduce the number of PRs.

 streams/writable-manywrites.js callback='no' writev='no' sync='no' n=2000000                    6.27 %       ±6.47%  ±8.63% ±11.26%
 streams/writable-manywrites.js callback='no' writev='no' sync='yes' n=2000000            *      8.43 %       ±6.68%  ±8.90% ±11.59%
 streams/writable-manywrites.js callback='no' writev='yes' sync='no' n=2000000                   7.77 %       ±7.88% ±10.49% ±13.69%
 streams/writable-manywrites.js callback='no' writev='yes' sync='yes' n=2000000           *      6.79 %       ±5.75%  ±7.65%  ±9.96%
 streams/writable-manywrites.js callback='yes' writev='no' sync='no' n=2000000          ***     11.31 %       ±6.08%  ±8.11% ±10.60%
 streams/writable-manywrites.js callback='yes' writev='no' sync='yes' n=2000000          **      7.76 %       ±5.46%  ±7.27%  ±9.46%
 streams/writable-manywrites.js callback='yes' writev='yes' sync='no' n=2000000                  6.12 %       ±7.40%  ±9.85% ±12.82%
 streams/writable-manywrites.js callback='yes' writev='yes' sync='yes' n=2000000         **      8.11 %       ±4.90%  ±6.52%  ±8.48%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ronag
stream: removed unecessary writing property
38d9b7f
writecb casted to boolean has the same
value as writing.
@nodejs-github-bot nodejs-github-bot added the stream Issues and PRs related to Node.js streams. label Apr 17, 2020
@nodejs-github-bot

nodejs-github-bot commented Apr 17, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/30806/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag
ronag requested a review from lpinca April 17, 2020 07:16
@ronag
stream: simplify clearBuffer condition
4ac87be
Was doing some unecessary checks.
@ronag
ronag force-pushed the writable-simplify branch from 959cba0 to 4ac87be Compare April 17, 2020 09:04
ronag
ronag commented Apr 17, 2020
View reviewed changes
Comment thread lib/_stream_writable.js
!state.corked &&
!state.bufferProcessing &&
state.bufferedRequest) {
if (state.bufferedRequest) {

@ronag ronag Apr 17, 2020

Copy link
Copy Markdown
Member Author

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.

This condition is a duplicate of what's inside of clearBuffer. However, it is here on purpose since clearBuffer is not inlineable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mscdex

mscdex commented Apr 17, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This seems to have a negative effect on Duplex creation:

streams/creation.js kind='duplex' n=50000000                                           ***     -6.94 %       ±3.44% ±4.62%  ±6.09%
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag

ronag commented Apr 17, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@mscdex Flaky made?

Local:

 streams/creation.js kind='duplex' n=5000000                 2.88 %       ±5.44% ±7.25% ±9.46%
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag

ronag commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

Benchmark CI (creation): https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/556/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag

ronag commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

Nope, seems consistent:

17:55:08  streams/creation.js kind='duplex' n=50000000           ***     -7.40 %       ±2.49% ±3.31% ±4.31%

Strange... not sure how this PR could cause that

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag
fixup: try perf
206f62b
@ronag

ronag commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/557/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag

ronag commented Apr 17, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@mscdex: I'm quite baffled why this PR would affect duplex creation performance. Any ideas?

Anyway, a 7% performance increase in writing I guess is still worth it with a 7% performance degradation in creation?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag
Revert "fixup: try perf"
4331da7
This reverts commit 206f62b.
@mscdex

mscdex commented Apr 17, 2020

Copy link
Copy Markdown
Contributor

I don't know offhand, you'd probably have to compare either the generated/optimized code or optimizer/inliner trace output before and after this PR to see what is different.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ronag ronag added the wip Issues and PRs that are still a work in progress. label Apr 17, 2020
@ronag ronag closed this Apr 24, 2020
This was referenced Aug 31, 2021
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 Dmarch28/node#31
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#41
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 meghasfdc/node#41
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 ron-a20/node#40
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 Rednickle/node-1#27
Open
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#16
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 sitedata/node#31
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#20
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 aliceUnhinged613/node#31
Open
This was referenced Sep 12, 2021
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 Dmarch28/node#35
Open
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#20
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 wedataintelligence/node#12
Open
@137717unity 137717unity mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#122
Open
@baby636 baby636 mentioned this pull request Mar 22, 2024
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#136
Open
@kissofire kissofire mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#124
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities aliceUnhinged613/node#123
Open
@ron-a20 ron-a20 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#121
Open
@wedataintelligence wedataintelligence mentioned this pull request Mar 23, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#105
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 13, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#127
Open
@molllyn1 molllyn1 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities molllyn1/node#111
Open
@ron-a20 ron-a20 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#126
Open
@kissofire kissofire mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#128
Open
@137717unity 137717unity mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#128
Open
@baby636 baby636 mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities baby636/node#149
Open
@wedataintelligence wedataintelligence mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#111
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 15, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#129
Open
@kissofire kissofire mentioned this pull request May 20, 2024
[Snyk] Fix for 1 vulnerabilities kissofire/node#130
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#130
Open
@wedataintelligence wedataintelligence mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities wedataintelligence/node#112
Open
@137717unity 137717unity mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities 137717unity/node#129
Open
@molllyn1 molllyn1 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities molllyn1/node#113
Open
@ron-a20 ron-a20 mentioned this pull request May 22, 2024
[Snyk] Fix for 1 vulnerabilities ron-a20/node#127
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities wedataintelligence/node#127
Open
@ron-a20 ron-a20 mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities ron-a20/node#142
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Oct 11, 2024
[Snyk] Fix for 4 vulnerabilities aliceUnhinged613/node#146
Open
@137717unity 137717unity mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#145
Open
@kissofire kissofire mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#147
Open
@137717unity 137717unity mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#146
Open
@kissofire kissofire mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#148
Open
@opekeye opekeye mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 opekeye/node#17
Open
@molllyn1 molllyn1 mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#131
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 wedataintelligence/node#129
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lpinca lpinca Awaiting requested review from lpinca

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

stream Issues and PRs related to Node.js streams. wip Issues and PRs that are still a work in progress.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ronag @nodejs-github-bot @mscdex
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.