Files
Matteo Collina 291d62f885 stream: drop rejection step for sync transforms
transformStreamDefaultControllerPerformTransform chained a rejection
step onto the result of every transform() call. A non-thenable result
cannot reject, so return the shared resolved promise directly and save
a promise allocation and a microtask per chunk.

The write promise of a transform whose transform() returns a
non-thenable now settles one microtask earlier than in the reference
implementation. The relative order of all stream events is unchanged.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67339
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 07:55:28 +00:00
..