mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Pure-JavaScript optimizations to lib/internal/webstreams/* that reduce per-chunk and per-construction allocations on hot paths without observable behavior change. Per-chunk: reuse promise-reaction closures per controller, add buffered fast path for async iterator, specialize callback wrappers by arity, and share immutable nil records for writable stream resets. Per-construction: use queueMicrotask for non-object start results, materialize reader/writer .closed and .ready records lazily, and remove dead allocations. Assisted-by: Claude Fable 5 Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/63876 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>