stream: pipe lazy drain#29095
Closed
ronag wants to merge 1 commit intonodejs:masterfrom
Closed
Conversation
99c0615 to
9bf7643
Compare
3355012 to
10fe46a
Compare
b3be9d3 to
e81f6c2
Compare
Member
Author
|
Mixing |
e81f6c2 to
c8da80a
Compare
addaleax
approved these changes
Aug 12, 2019
c8da80a to
45bac8d
Compare
Member
|
Why do you think this is a optimization? |
Member
Author
|
It skips the extra allocation and lookup. |
mcollina
approved these changes
Aug 13, 2019
Member
Author
There was a problem hiding this comment.
Mixing pipe with 'readable' is a nono since registering readable messes with state.flowing.
Member
Author
There was a problem hiding this comment.
I'm actually not sure what this is supposed to test and whether is even valid?
836880a to
60067c6
Compare
60067c6 to
59eb36c
Compare
Member
|
Results are decidedly "no significant change in performance detected". None of them came in with a p-value lower than 0.05. 13:47:22 confidence improvement accuracy (*) (**) (***)
13:47:22 streams/creation.js kind='duplex' n=50000000 0.42 % ±2.59% ±3.44% ±4.48%
13:47:22 streams/creation.js kind='readable' n=50000000 0.61 % ±4.21% ±5.65% ±7.45%
13:47:22 streams/creation.js kind='transform' n=50000000 -0.14 % ±2.46% ±3.29% ±4.31%
13:47:22 streams/creation.js kind='writable' n=50000000 -2.13 % ±3.29% ±4.37% ±5.69%
13:47:22 streams/pipe.js n=5000000 1.55 % ±3.43% ±4.56% ±5.95%
13:47:22 streams/pipe-object-mode.js n=5000000 1.41 % ±3.66% ±4.87% ±6.34%
13:47:22 streams/readable-bigread.js n=1000 -1.95 % ±2.44% ±3.24% ±4.22%
13:47:22 streams/readable-bigunevenread.js n=1000 6.89 % ±14.51% ±19.31% ±25.15%
13:47:22 streams/readable-boundaryread.js type='buffer' n=2000 -0.89 % ±2.11% ±2.81% ±3.66%
13:47:22 streams/readable-boundaryread.js type='string' n=2000 -0.15 % ±1.98% ±2.64% ±3.43%
13:47:22 streams/readable-readall.js n=5000 -0.29 % ±1.98% ±2.64% ±3.43%
13:47:22 streams/readable-unevenread.js n=1000 -1.07 % ±1.85% ±2.48% ±3.25%
13:47:22 streams/writable-manywrites.js n=2000000 0.54 % ±5.16% ±6.87% ±8.94%
13:47:22 |
Member
|
(Of course, maybe the benchmark isn't significantly exercising the optimization here?) |
Member
Trott
approved these changes
Aug 16, 2019
Member
|
Landed in 7195cd6 |
Trott
pushed a commit
that referenced
this pull request
Aug 16, 2019
PR-URL: #29095 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]>
targos
pushed a commit
that referenced
this pull request
Aug 19, 2019
PR-URL: #29095 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This was referenced Aug 20, 2019
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
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.
Slight optimization. Don't allocate and register the drain function for fast consumers.
Related #29087
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesNOTE TO SELF: After this has been merged, look into removing unnecessary
onclose.