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/src
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
..
client feat: deferred hydration (#7362) 2026-05-19 18:43:00 +02:00
client-rpc perf(start-client-core): zero-copy frame payload extraction (#7662) 2026-06-23 00:15:37 +02:00
fake-entries fix(start): avoid encoded virtual adapter ids in vite dev (#7484) 2026-05-25 01:01:47 +02:00
hydration feat: deferred hydration (#7362) 2026-05-19 18:43:00 +02:00
tests rename inputValidator to validator (#7566) 2026-06-06 23:05:56 +02:00
constants.ts feat(start-core): add method and serverFnMeta property to ServerFnCtx (#6394) 2026-01-17 16:17:20 +01:00
createCsrfMiddleware.ts fix: revert plugin changes, createCsrfMiddleware compilation, fix HMR tests (#7400) 2026-05-15 16:35:59 +02:00
createMiddleware.ts rename inputValidator to validator (#7566) 2026-06-06 23:05:56 +02:00
createServerFn.ts rename inputValidator to validator (#7566) 2026-06-06 23:05:56 +02:00
createStart.ts chore: remove unnecessary type assertions (#6365) 2026-02-21 11:29:18 +01:00
empty-plugin-adapters.ts fix(start): avoid encoded virtual adapter ids in vite dev (#7484) 2026-05-25 01:01:47 +02:00
getDefaultSerovalPlugins.ts efp (#7144) 2026-04-11 01:43:05 +02:00
getGlobalStartContext.ts fix: compiler plugin (#6177) 2025-12-22 14:57:50 +01:00
getRouterInstance.ts fix: compiler plugin (#6177) 2025-12-22 14:57:50 +01:00
getStartContextServerOnly.ts fix: compiler plugin (#6177) 2025-12-22 14:57:50 +01:00
getStartOptions.ts fix: compiler plugin (#6177) 2025-12-22 14:57:50 +01:00
global.ts feat: Start RC (#5189) 2025-09-23 11:34:54 -06:00
hydration.ts feat: deferred hydration (#7362) 2026-05-19 18:43:00 +02:00
index.tsx feat(start): CSRF middleware (#7373) 2026-05-09 18:34:24 +02:00
safeObjectMerge.ts fix: refactor middleware (#5517) 2025-12-27 01:06:32 +01:00
serverRoute.ts feat: pass routeId into context/beforeLoad (#6579) 2026-02-03 00:59:12 +01:00
start-entry.d.ts feat: early hints (#7324) 2026-05-02 23:35:52 +02:00
startEntry.ts feat: Start RC (#5189) 2025-09-23 11:34:54 -06:00