feat: use fast-webstreams for server rendering
Replace global WebStream constructors (ReadableStream, WritableStream, TransformStream) with faster Node.js-backed implementations from experimental-fast-webstreams. The patching happens synchronously in node-environment-baseline.ts before any rendering code loads. Includes vendored fixes: - fix(pipe-to): drain buffered flush chunks before shutdown in specPipeTo - perf(pipe-to): batch sync reads to reduce microtask yields Benchmark (force-dynamic page, 4KB response): Single client: 611 -> 1,011 req/s (+65% vs native WebStreams) Under load: 1,167 -> 1,128 req/s (on par, -22% p99 latency)
Showing
| ... | @@ -206,6 +206,7 @@ | ... | @@ -206,6 +206,7 @@ |
| "execa": "2.0.3", | "execa": "2.0.3", | ||
| "expect": "29.7.0", | "expect": "29.7.0", | ||
| "expect-type": "0.14.2", | "expect-type": "0.14.2", | ||
| "experimental-fast-webstreams": "0.0.5", | |||
| "express": "4.17.0", | "express": "4.17.0", | ||
| "faker": "5.5.3", | "faker": "5.5.3", | ||
| "faunadb": "2.6.1", | "faunadb": "2.6.1", | ||
| ... | @@ -344,7 +345,8 @@ | ... | @@ -344,7 +345,8 @@ |
| "@types/node@20.17.6": "patches/@types__node@20.17.6.patch", | "@types/node@20.17.6": "patches/@types__node@20.17.6.patch", | ||
| "taskr@1.1.0": "patches/taskr@1.1.0.patch", | "taskr@1.1.0": "patches/taskr@1.1.0.patch", | ||
| "minizlib@3.1.0": "patches/minizlib@3.1.0.patch", | "minizlib@3.1.0": "patches/minizlib@3.1.0.patch", | ||
| "http-proxy@1.18.1": "patches/http-proxy@1.18.1.patch" | "http-proxy@1.18.1": "patches/http-proxy@1.18.1.patch", | ||
| "experimental-fast-webstreams@0.0.5": "patches/experimental-fast-webstreams@0.0.5.patch" | |||
| } | } | ||
| } | } | ||
| } | } |
This diff is collapsed.
Please
register
or
sign in
to comment