Repository navigation
http: batch body spans per parser execute - #67187
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>
|
Review requested:
|
|
Any benchmark/perf numbers? |
|
https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1903/ Benchmark |
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
left a comment
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>
bfabf27 to
8f623b9
Compare
I tried passing the body to |
|
Given the change, I don't think this needs to be semver-major. |
|
Landed in 36452f1 |
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>
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
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.