0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/start-client-core
Yagiz Nizipli ba52d2b8f9
perf(start-client-core): zero-copy frame payload extraction (#7662)
extractFlattened() always allocated a new Uint8Array and copied `count`
bytes, even when the requested bytes were fully contained in the first
buffered chunk (the common case, since most frames arrive within a single
network read).

Add a fast path that returns a subarray view of the first chunk when the
bytes are contiguous, avoiding the allocation and the byte copy. The
multi-chunk path is unchanged. The returned view shares the chunk's
backing ArrayBuffer, which is safe because buffered chunks are never
mutated in place after being read.

This is on the hot path for decoding every streamed server-function
response and RawStream binary payload on the client. A micro-benchmark
shows ~3x faster extraction for 1KB frames and ~27x for 64KB frames (the
win scales with payload size).
History 2026-06-23 00:15:37 +02:00
..
skills rename inputValidator to validator (#7566) 2026-06-06 23:05:56 +02:00
src perf(start-client-core): zero-copy frame payload extraction (#7662) 2026-06-23 00:15:37 +02:00
tests perf(start-client-core): zero-copy frame payload extraction (#7662) 2026-06-23 00:15:37 +02:00
CHANGELOG.md ci: Version Packages (#7567) 2026-06-06 23:39:56 +02:00
eslint.config.js chore(start-client-core): move mergeHeaders and startSerializer to shared package (#3709) 2025-03-10 00:09:53 +01:00
package.json ci: Version Packages (#7567) 2026-06-06 23:39:56 +02:00
README.md feat: Merge alpha to main (#4365) 2025-06-10 23:19:32 +02:00
tsconfig.build.json chore: upgrade tooling to typescript 6 (#7024) 2026-03-23 22:59:52 +01:00
tsconfig.json chore: upgrade tooling to typescript 6 (#7024) 2026-03-23 22:59:52 +01:00
vite.config.ts fix(start): avoid encoded virtual adapter ids in vite dev (#7484) 2026-05-25 01:01:47 +02:00

TanStack Start - Client Core

This package is not meant to be used directly. It is a dependency of the TanStack Start framework-specific packages:

It provides the core functionality for TanStack Start, which is a fullstack-framework made for SSR, Streaming, Server Functions, API Routes, bundling and more powered by TanStack Router.

Head over to tanstack.com/start for more information about getting started.