Repository navigation
http: batch body spans per parser execute - #67187
Merged
Merged
Conversation
Buffer body spans in on_body() and deliver them to JS once per execute() call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call and Buffer per chunk. Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
Collaborator
|
Review requested:
|
Member
|
Any benchmark/perf numbers? |
Member
Author
Benchmark |
ronag
reviewed
Nov 1, 2026
ronag
reviewed
Nov 1, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67187 +/- ##
==========================================
+ Coverage 90.67% 90.71% +0.03%
==========================================
Files 797 797
Lines 278773 278924 +151
Branches 53607 53639 +32
==========================================
+ Hits 252778 253023 +245
+ Misses 16356 16264 -92
+ Partials 9639 9637 -2
🚀 New features to boost your workflow:
|
ronag
reviewed
Nov 2, 2026
ronag
left a comment
Member
There was a problem hiding this comment.
if we could somehow avoid the callback that would also be great.
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
araujogui
force-pushed
the
http-batch-chunked-body
branch
from
November 3, 2026 17:58
bfabf27 to
8f623b9
Compare
Member
Author
I tried passing the body to |
Member
|
Given the change, I don't think this needs to be semver-major. |
ronag
approved these changes
Nov 4, 2026
Collaborator
|
Landed in 36452f1 |
aduh95
pushed a commit
that referenced
this pull request
Nov 11, 2026
Buffer body spans in on_body() and deliver them to JS once per execute() call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call and Buffer per chunk. Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> PR-URL: #67187 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
nodejs-github-bot
added a commit
that referenced
this pull request
Nov 11, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 crypto: * (SEMVER-MINOR) make X.509 inspection guards explicit (Filip Skokan) #67245 * (SEMVER-MINOR) add X.509 generation with CSR support (Filip Skokan) #67245 dns: * (SEMVER-MINOR) coalesce identical concurrent lookup() requests (Orgad Shaneh) #62599 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 sea: * (SEMVER-MINOR) generate a compile cache for the VFS modules (Matteo Collina) #66768 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 PR-URL: #67415
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 crypto: * (SEMVER-MINOR) make X.509 inspection guards explicit (Filip Skokan) #67245 * (SEMVER-MINOR) add X.509 generation with CSR support (Filip Skokan) #67245 dns: * (SEMVER-MINOR) coalesce identical concurrent lookup() requests (Orgad Shaneh) #62599 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 sea: * (SEMVER-MINOR) generate a compile cache for the VFS modules (Matteo Collina) #66768 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 PR-URL: #67415
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 2026
Buffer body spans in on_body() and deliver them to JS once per execute() call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call and Buffer per chunk. Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> PR-URL: #67187 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 2026
Buffer body spans in on_body() and deliver them to JS once per execute() call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call and Buffer per chunk. Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> PR-URL: #67187 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
nodejs-github-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 fs: * (SEMVER-MINOR) add mkstemp() (Marco) #66484 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 lib: * (SEMVER-MINOR) speed up AbortSignal (Robert Nagy) #66789 module: * (SEMVER-MINOR) add --experimental-strip-private-modules (Marco Ippolito) #63869 process: * (SEMVER-MINOR) return unregister fn from finalization (Matteo Collina) #66482 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795 * (SEMVER-MINOR) add mockReturnValue and promise helpers (Guilherme Araújo) #66631 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 zlib: * (SEMVER-MINOR) add crc32c (Philipp Dunkel) #66828 PR-URL: #67664
aduh95
added a commit
that referenced
this pull request
Nov 21, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 fs: * (SEMVER-MINOR) add mkstemp() (Marco) #66484 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 lib: * (SEMVER-MINOR) speed up AbortSignal (Robert Nagy) #66789 module: * (SEMVER-MINOR) add --experimental-strip-private-modules (Marco Ippolito) #63869 process: * (SEMVER-MINOR) return unregister fn from finalization (Matteo Collina) #66482 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795 * (SEMVER-MINOR) add mockReturnValue and promise helpers (Guilherme Araújo) #66631 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 zlib: * (SEMVER-MINOR) add crc32c (Philipp Dunkel) #66828 PR-URL: #67664
gabylb
pushed a commit
to gabylb/node
that referenced
this pull request
Nov 27, 2026
Buffer body spans in on_body() and deliver them to JS once per execute() call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call and Buffer per chunk. Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> PR-URL: nodejs#67187 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
gabylb
pushed a commit
to gabylb/node
that referenced
this pull request
Nov 27, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) nodejs#66639 crypto: * (SEMVER-MINOR) make X.509 inspection guards explicit (Filip Skokan) nodejs#67245 * (SEMVER-MINOR) add X.509 generation with CSR support (Filip Skokan) nodejs#67245 dns: * (SEMVER-MINOR) coalesce identical concurrent lookup() requests (Orgad Shaneh) nodejs#62599 doc: * add efekrskl to collaborators (Efe Karasakal) nodejs#67376 * add Philipp Dunkel to contributors (Philipp Dunkel) nodejs#67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) nodejs#67377 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) nodejs#67187 sea: * (SEMVER-MINOR) generate a compile cache for the VFS modules (Matteo Collina) nodejs#66768 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) nodejs#66311 PR-URL: nodejs#67415
aduh95
added a commit
that referenced
this pull request
Nov 30, 2026
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 fs: * (SEMVER-MINOR) add mkstemp() (Marco) #66484 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 lib: * (SEMVER-MINOR) speed up AbortSignal (Robert Nagy) #66789 module: * (SEMVER-MINOR) add --experimental-strip-private-modules (Marco Ippolito) #63869 process: * (SEMVER-MINOR) return unregister fn from finalization (Matteo Collina) #66482 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795 * (SEMVER-MINOR) add mockReturnValue and promise helpers (Guilherme Araújo) #66631 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 zlib: * (SEMVER-MINOR) add crc32c (Philipp Dunkel) #66828 PR-URL: #67664
mcollina
added a commit
to nodejs/undici
that referenced
this pull request
Dec 3, 2026
Node.js 26.14.0 changed two behaviors these tests depended on: - The HTTP server now delivers all request body chunks parsed from one socket read in a single 'data' event (nodejs/node#67187). The client and pipelining tests counted 'data' events or compared each one to a sent chunk. They now check the whole body. - The default abort reason no longer captures a stack (nodejs/node#66789). The dump test now checks that the rejection is the signal's reason instead of matching Node.js internal frames. A failed assertion left these tests waiting on a plan that could never complete, so the unit run hung until the job timed out on macOS, Windows, and the --without-intl build. Signed-off-by: Matteo Collina <hello@matteocollina.com>
mcollina
added a commit
to nodejs/undici
that referenced
this pull request
Dec 3, 2026
Node.js 26.14.0 changed two behaviors these tests depended on: - The HTTP server now delivers all request body chunks parsed from one socket read in a single 'data' event (nodejs/node#67187). The client and pipelining tests counted 'data' events or compared each one to a sent chunk. They now check the whole body. - The default abort reason no longer captures a stack (nodejs/node#66789). The dump test now checks that the rejection is the signal's reason instead of matching Node.js internal frames. A failed assertion left these tests waiting on a plan that could never complete, so the unit run hung until the job timed out on macOS, Windows, and the --without-intl build. Signed-off-by: Matteo Collina <hello@matteocollina.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.
Buffer body spans in
on_body()and deliver them to JS once perexecute()call instead of once per chunk. A body sent as many small chunks no longer costs one C++ to JS call andBufferper chunk.Chunks that arrive in the same read now produce a single
'data'event onIncomingMessage. Chunk boundaries were never documented, but code that treats each'data'event as a full message could break, so this needs a CITGM run.