stream: lazy allocate back pressure buffer#50013
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Oct 5, 2023
Merged
stream: lazy allocate back pressure buffer#50013nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
91605c3 to
fe4064a
Compare
MoLow
reviewed
Oct 2, 2023
Collaborator
benjamingr
reviewed
Oct 2, 2023
benjamingr
approved these changes
Oct 2, 2023
Member
benjamingr
left a comment
There was a problem hiding this comment.
I think we need to deal with cases the consumer calls .buffered.length as we see from http2, so we can probably define a prototype getter for it that returns it if not initialised and internally use a different property name
18 tasks
ronag
added a commit
to nxtedition/node
that referenced
this pull request
Oct 3, 2023
Collaborator
ronag
commented
Oct 3, 2023
ronag
commented
Oct 3, 2023
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/50013 ✔ Done loading data for nodejs/node/pull/50013 ----------------------------------- PR info ------------------------------------ Title stream: lazy allocate back pressure buffer (#50013) Author Robert Nagy (@ronag) Branch ronag:lazy-buffer -> nodejs:main Labels author ready, needs-ci Commits 3 - stream: lazy allocate back pressure buffer - Update lib/internal/http2/core.js - Update lib/internal/streams/writable.js Committers 2 - Robert Nagy - GitHub PR-URL: https://github.com/nodejs/node/pull/50013 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/50013 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 02 Oct 2023 11:57:50 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/50013#pullrequestreview-1652639906 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/50013#pullrequestreview-1654890641 ⚠ This PR has conflicts that must be resolved ✘ Last GitHub CI failed ℹ Last Full PR CI on 2023-10-03T10:34:32Z: https://ci.nodejs.org/job/node-test-pull-request/54490/ - Querying data for job/node-test-pull-request/54490/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/6405634162 |
ronag
added a commit
to nxtedition/node
that referenced
this pull request
Oct 4, 2023
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/50013 ✔ Done loading data for nodejs/node/pull/50013 ----------------------------------- PR info ------------------------------------ Title stream: lazy allocate back pressure buffer (#50013) Author Robert Nagy (@ronag) Branch ronag:lazy-buffer -> nodejs:main Labels author ready, needs-ci Commits 1 - stream: lazy allocate back pressure buffer Committers 1 - Robert Nagy PR-URL: https://github.com/nodejs/node/pull/50013 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/50013 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - stream: lazy allocate back pressure buffer ℹ This PR was created on Mon, 02 Oct 2023 11:57:50 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/50013#pullrequestreview-1652639906 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/50013#pullrequestreview-1654890641 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2023-10-04T14:36:55Z: https://ci.nodejs.org/job/node-test-pull-request/54529/ - Querying data for job/node-test-pull-request/54529/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/6409353418 |
liuxingbaoyu
reviewed
Oct 4, 2023
Comment on lines
+537
to
+542
| if ((state.state & kBuffered) === 0) { | ||
| state.state |= kBuffered; | ||
| state[kBufferedValue] = []; | ||
| } | ||
|
|
||
| state[kBufferedValue].push({ chunk, encoding, callback }); |
Contributor
There was a problem hiding this comment.
if ((state.state & kBuffered) === 0) {
state.state |= kBuffered;
state[kBufferedValue] = [{ chunk, encoding, callback }];
} else {
state[kBufferedValue].push({ chunk, encoding, callback });
}Just curious, will there be any observable performance improvements?
13 tasks
Collaborator
Collaborator
|
Landed in e9bda11 |
This was referenced Oct 6, 2023
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
PR-URL: nodejs#50013 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 11, 2023
PR-URL: #50013 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
debadree25
pushed a commit
to debadree25/node
that referenced
this pull request
Apr 15, 2024
PR-URL: nodejs#50013 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@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
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.
Uh oh!
There was an error while loading. Please reload this page.