Matteo Collina
1b0597b4ef
stream: cut per-chunk allocations in pipeTo
...
readableStreamPipeTo allocated, for every chunk written to the
destination, a { promise, resolve, reject } write request record that
it immediately marked as handled, and drove its loop with an async
step()/run() pair whose implicit promises cost one allocation and one
reaction per iteration. The parked-read path additionally allocated a
read request object, a PromiseWithResolvers record, and a microtask
closure per chunk; this is the steady state for pipeThrough, since a
TransformStream's readable side has a high water mark of zero.
Replace the per-write records with a single per-pipe tracker that the
write request queue holds once per pending write and whose
resolve()/reject() methods maintain a pending-write count, drive the
pump loop with plain callbacks instead of async functions, and reuse
one read request and one forwarding function across all chunks, the
same pattern tee uses since c543cfb72b .
Benchmark results (benchmark/compare.js --runs 20):
webstreams/pipe-to.js +29.9% to +35.8% across all 16 configurations
(all 99.9% confidence); a pipeThrough(TransformStream) passthrough
loop improves ~17%; every other webstreams benchmark is unchanged.
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/64890
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-08-05 11:15:13 +02:00
..
2026-08-05 11:15:04 +02:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:01 +02:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:25 -03:00
2026-07-29 10:31:28 -03:00
2026-08-04 18:40:45 +02:00
2026-07-06 11:58:00 +00:00
2026-07-29 10:31:34 -03:00
2026-08-05 11:15:08 +02:00
2026-08-05 11:15:05 +02:00
2026-07-30 13:24:09 +02:00
2026-08-04 18:40:46 +02:00
2026-08-05 11:15:06 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:05 +02:00
2026-08-05 11:15:08 +02:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:09 +02:00
2026-07-30 13:24:09 +02:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:29 -03:00
2026-07-29 10:31:29 -03:00
2026-07-29 10:31:29 -03:00
2026-07-29 10:31:29 -03:00
2026-07-29 10:31:29 -03:00
2026-07-03 16:05:17 +00:00
2026-07-03 16:05:17 +00:00
2026-07-29 10:31:33 -03:00
2026-08-04 18:40:44 +02:00
2026-08-04 18:40:44 +02:00
2026-07-03 16:04:27 +00:00
2026-07-03 16:04:27 +00:00
2026-07-27 19:28:25 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:30 -03:00
2026-07-29 10:31:29 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:30 -03:00
2026-07-29 10:31:30 -03:00
2026-07-29 10:31:30 -03:00
2026-07-29 10:31:30 -03:00
2026-07-29 10:31:28 -03:00
2026-07-25 16:02:57 -03:00
2026-07-30 13:24:10 +02:00
2026-07-29 10:31:33 -03:00
2026-07-29 10:31:27 -03:00
2026-08-04 18:40:44 +02:00
2026-07-03 16:05:56 +00:00
2026-07-29 10:31:27 -03:00
2026-07-27 19:28:25 -03:00
2026-07-27 19:28:25 -03:00
2026-08-04 18:40:46 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:12 +02:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:09 +02:00
2026-07-03 16:05:44 +00:00
2026-07-29 10:31:23 -03:00
2026-08-05 11:15:02 +02:00
2026-07-27 19:28:25 -03:00
2026-07-27 19:28:24 -03:00
2026-07-27 19:28:24 -03:00
2026-07-27 19:28:25 -03:00
2026-08-05 11:15:08 +02:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:07 +02:00
2026-07-06 12:45:12 +00:00
2026-07-29 10:31:28 -03:00
2026-08-05 11:15:07 +02:00
2026-07-06 15:21:51 +00:00
2026-08-04 18:40:46 +02:00
2026-07-29 10:31:27 -03:00
2026-08-04 18:40:46 +02:00
2026-08-04 18:40:46 +02:00
2026-08-04 18:40:46 +02:00
2026-08-04 18:40:46 +02:00
2026-07-06 10:03:32 +02:00
2026-08-05 11:15:03 +02:00
2026-07-03 16:04:08 +00:00
2026-07-03 16:03:45 +00:00
2026-07-03 16:03:45 +00:00
2026-07-29 10:31:35 -03:00
2026-07-29 10:31:35 -03:00
2026-07-03 16:05:49 +00:00
2026-08-04 18:40:44 +02:00
2026-07-03 16:05:42 +00:00
2026-07-27 19:28:25 -03:00
2026-07-27 19:28:25 -03:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:03 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:23 -03:00
2026-08-04 18:40:45 +02:00
2026-07-29 10:31:27 -03:00
2026-07-03 16:05:19 +00:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:31 -03:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:04 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:22 -03:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-08-05 11:15:09 +02:00
2026-07-29 10:31:27 -03:00
2026-08-04 18:40:47 +02:00
2026-08-05 11:15:04 +02:00
2026-07-29 10:31:23 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:01 +02:00
2026-08-05 11:15:12 +02:00
2026-07-03 16:03:35 +00:00
2026-07-03 16:03:50 +00:00
2026-08-04 18:40:47 +02:00
2026-08-05 11:15:03 +02:00
2026-08-05 11:15:03 +02:00
2026-08-05 11:15:11 +02:00
2026-07-29 10:31:22 -03:00
2026-07-27 19:28:25 -03:00
2026-07-03 16:03:48 +00:00
2026-07-29 10:31:27 -03:00
2026-08-05 11:15:08 +02:00
2026-08-05 11:15:06 +02:00
2026-07-30 13:24:10 +02:00
2026-07-03 16:05:12 +00:00
2026-07-06 10:03:33 +02:00
2026-07-30 13:24:11 +02:00
2026-08-05 11:15:04 +02:00
2026-08-05 11:15:06 +02:00
2026-07-29 10:31:26 -03:00
2026-07-29 10:31:24 -03:00
2026-07-03 16:03:31 +00:00
2026-07-30 13:24:10 +02:00
2026-07-30 13:24:10 +02:00
2026-07-30 13:24:10 +02:00
2026-08-05 11:15:12 +02:00
2026-08-05 11:15:06 +02:00
2026-07-30 13:24:10 +02:00
2026-07-30 13:24:10 +02:00
2026-07-30 13:24:10 +02:00
2026-07-29 10:31:26 -03:00
2026-07-30 13:24:11 +02:00
2026-08-04 18:40:44 +02:00
2026-07-30 13:24:10 +02:00
2026-07-30 13:24:10 +02:00
2026-07-29 10:31:33 -03:00
2026-08-05 11:15:12 +02:00
2026-07-06 15:21:51 +00:00
2026-07-29 10:31:33 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:24 -03:00
2026-07-03 16:05:21 +00:00
2026-07-29 10:31:27 -03:00
2026-07-30 13:23:58 +02:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:27 -03:00
2026-07-03 16:05:56 +00:00
2026-07-29 10:31:31 -03:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-04 18:40:45 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-05 11:15:07 +02:00
2026-08-04 18:40:49 +02:00
2026-07-29 10:31:30 -03:00
2026-08-04 18:40:46 +02:00
2026-07-06 10:03:32 +02:00
2026-07-06 10:03:32 +02:00
2026-07-06 10:03:32 +02:00
2026-07-29 10:31:32 -03:00
2026-07-03 16:04:37 +00:00
2026-07-03 16:05:46 +00:00
2026-08-04 18:40:49 +02:00
2026-07-29 10:31:21 -03:00
2026-08-05 11:15:03 +02:00
2026-07-03 16:04:37 +00:00
2026-07-06 14:13:17 +00:00
2026-07-29 10:31:32 -03:00
2026-07-29 10:31:32 -03:00
2026-07-29 10:31:23 -03:00
2026-07-03 16:05:04 +00:00
2026-07-30 13:24:08 +02:00
2026-07-30 13:24:08 +02:00
2026-07-03 16:03:53 +00:00
2026-08-05 11:15:13 +02:00
2026-07-29 10:31:24 -03:00
2026-08-05 11:15:04 +02:00
2026-08-04 18:40:47 +02:00
2026-08-05 11:15:01 +02:00
2026-07-29 10:31:27 -03:00
2026-07-29 10:31:22 -03:00
2026-07-06 15:21:50 +00:00
2026-07-27 19:28:25 -03:00
2026-07-03 16:04:42 +00:00
2026-07-29 10:31:35 -03:00
2026-07-03 16:04:40 +00:00
2026-08-04 18:40:44 +02:00
2026-08-04 18:40:44 +02:00