-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
stream: readable read one buffer at a time #60441
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
base: main
Are you sure you want to change the base?
Conversation
|
Review requested:
|
mcollina
left a comment
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.
code lgtm
I think some docs changes are needed
|
Marked as semver-major. |
|
I'm -1 on this unless there is a strong reason for it. Historically, |
The performance overhead is huge. As it stand we should at least add a note to avoid this api for anything performance sensitive.
Good point. |
What doc changes are you roughly asking for? |
a380c35 to
0798db8
Compare
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Failed to start CI⚠ Commits were pushed since the last approving review: ⚠ - stream: readable read one buffer at a time ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/20654449594 |
Failed to start CI⚠ Commits were pushed since the last approving review: ⚠ - stream: readable read one buffer at a time ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/20654684497 |
|
actually, no doc changes are needed.
@lpinca this PR matches what we are already documenting. We could even make a case for this to be a bugfix. Anyway, we should run citgm and see if there are breakages. Given the significant impact on performance, I think we should be landing this. |
7053647 to
bb6af6c
Compare
There is an occurrence in |
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Instead of wasting cycles concatenating buffers, just return each one by one. Old behavior can be achieved by using `readable.read(readable.readableLength)` instead of `readable.read()`. PR: nodejs#60441
Failed to start CI⚠ Commits were pushed since the last approving review: ⚠ - stream: readable read one buffer at a time ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/20655680849 |
mcollina
left a comment
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.
lgtm
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60441 +/- ##
==========================================
+ Coverage 88.53% 88.55% +0.01%
==========================================
Files 704 704
Lines 208736 208741 +5
Branches 40274 40276 +2
==========================================
+ Hits 184810 184856 +46
+ Misses 15944 15905 -39
+ Partials 7982 7980 -2
🚀 New features to boost your workflow:
|
Instead of wasting cycles concatenating buffers, just return each one by one.