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

stream: improve readable push performance #13113

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@mscdex
Contributor

mscdex commented May 19, 2017

This is mostly about improving performance when pushing strings, but pushing Buffers seems to be just a tad faster too. Specifically this PR makes two types of changes: avoid unnecessary chunk validation and reducing duplicated conditionals.

Here are results from one of the benchmark files I modified to be able to test strings:

                                                        improvement confidence      p.value
 streams/readable-boundaryread.js type="buffer" n=2000      3.04 %          * 3.055942e-02
 streams/readable-boundaryread.js type="string" n=2000     19.08 %        *** 2.927688e-11

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)
  • stream
@mcollina

LGTM with CI green.

@mcollina

This comment has been minimized.

Member

mcollina commented May 19, 2017

When CITGM is restored, a CITGM run would be highly welcomed.

@mscdex

This comment has been minimized.

Contributor

mscdex commented May 20, 2017

@mscdex

This comment has been minimized.

Contributor

mscdex commented May 23, 2017

There does not seem to be any CITGM failures caused by this particular PR.

@mcollina

This comment has been minimized.

Member

mcollina commented May 23, 2017

@mscdex great news, LGTM!

@addaleax

This comment has been minimized.

Member

addaleax commented May 23, 2017

Landed in 359ea2a

@addaleax addaleax closed this May 23, 2017

addaleax added a commit that referenced this pull request May 23, 2017

stream: improve readable push performance
PR-URL: #13113
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

jasnell added a commit that referenced this pull request May 24, 2017

stream: improve readable push performance
PR-URL: #13113
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

@mscdex mscdex deleted the mscdex:stream-readable-push-perf branch May 26, 2017

jasnell added a commit that referenced this pull request May 28, 2017

stream: improve readable push performance
PR-URL: #13113
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

@jasnell jasnell referenced this pull request May 28, 2017

Closed

8.0.0 Release Proposal #12220

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete
@MylesBorins

This comment has been minimized.

Member

MylesBorins commented Jul 17, 2017

Should this be backported? Letting it bake for a little bit if so

@mcollina

This comment has been minimized.

Member

mcollina commented Jul 17, 2017

I'm 👍 on waiting, but it can be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment