ta
TanStack
OSS
ta
Pipelines
Nx runs
Insights
Compare tasks
Analytics
Sign in
Toggle Sidebar
ro
router
Pipelines
perf(router-core): serialize SSR RawStreams through a Seroval live stream The SSR RawStream plugin pumped its source into a replay `createStream()`, so Seroval kept every encoded chunk in the stream's buffer until the whole serialization was disposed, and the pump read the source as fast as it yielded. Seroval 1.7's `createLiveStream()` holds one event and settles each `write()` only once the record for it was accepted. `rawStreamCodec` now has one reader loop, `pumpEncoded`, that awaits each sink call before the next read. `pumpEncodedStream` keeps feeding a replay stream for the async JSON serializers, which collect the whole stream into one node anyway, so `createLiveStream` stays out of client bundles. The new `pumpEncodedLiveStream` feeds a live stream and is used by `RawStreamSSRPlugin`; its `onCancel` forwards Seroval's dispose reason to `reader.cancel()`, which the plugin's cleanup registration used to drop because Seroval runs cleanups in registration order. On the wire the stream constructor is emitted as `(1)`, so the browser-side stream accepts the router factory as its single subscriber and keeps no replay buffer. Serializing a 16 MiB RawStream retained 22.4 MiB at peak before and 1.3 MiB after (gated `rawStreamBackpressure.perf.test.ts`). Client bundles grow by 5 B gzip (`react-start.minimal`, `react-start.rsbuild.minimal`). Adds the `raw-stream-peak` server memory scenario: one document request whose loader returns a 128 x 64 KiB RawStream.
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
⌘K
perf(router-core): serialize SSR RawStreams through a Seroval live stream
Succeeded
in
8m 48s
Started
read
access token used
Copy command
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
8813
a110582
GitHub
Open on GitHub
Tasks
Resource Usage
ta
TanStack
OSS