Vercel News logoVercel News
|Backend

We Ralph Wiggumed WebStreams to make them 10x faster

2026-02-18
9 min read
171

Endigest AI Core Summary

This post describes fast-webstreams, a WHATWG Streams API reimplementation backed by Node.js internals to cut server-side rendering overhead.

  • Native WebStreams allocate multiple objects and microtask hops per chunk, causing a 12x throughput gap vs Node.js pipeline()
  • pipeThrough chains lazily resolve to a single pipeline() call with zero Promises per chunk, reaching ~6,200 MB/s (~10x faster)
  • Buffered reads use synchronous Promise.resolve() for 3.7x faster chunk-by-chunk throughput
  • The React Flight byte stream pattern sees 14.6x improvement (1,600 vs 110 MB/s native)
  • fetch() through 3 transforms gets 3.2x speedup via deferred resolution and a single native bridge
  • Passes 1,100 of 1,116 Web Platform Tests; can patch global stream constructors