* refactor(solid): retire solid-router-ssr-query — Solid's native channels carry the Router + Query pairing solid-query v6's QueryClientProvider serializes the request's cache into Solid's hydration registry during SSR and primes the client cache from it, so running the ssr-query transport alongside it ships every query payload twice. The package's two runtime conveniences are each a few lines of userland composition on public APIs: the provider wrap via the router's Wrap option, and cache-driven redirect() errors handed to router.navigate from the caches' config.onError. Converts the three Solid Start e2e apps to the composition (all suites green, including the redirect-from-query tests) and marks the package deprecated for the v2 line. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: changeset for the solid-router-ssr-query deprecation notice Co-authored-by: Cursor <cursoragent@cursor.com> * feat(solid-start): named single-flight source for router flight data Solid's single-flight channel is becoming multi-source (solidjs/solid 653dd41e): mutation responses carry a keyed envelope of per-cache slices, each routed to the consumer subscribed under its source id. Today Start claims the single unnamed slot on both halves, which means any other cache wanting mutation-response data (e.g. solid-query, whose provider subscribes under "sq" in TanStack/query#11326) displaces the router's — whichever registers last wins, silently. The router's flight data now rides its own source id ("tsr"): the server collector registers additively with registerFlightDataSource and the client subscribes its consumer under the same id, so router loader/match state and other caches' slices coexist on one round trip. A user-supplied collectFlightData hook keeps the unnamed slot to itself, adding data alongside the router's instead of displacing it. Both halves feature-detect the protocol on the installed @solidjs/web (it ships in the release after 2.0.0-rc.4) and fall back to the exact previous unnamed-slot behavior on older versions; since client and server resolve the same install, the halves cannot disagree. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(solid-router): loadFlightTarget, the cache-agnostic single-flight trigger The router's half of flight collection as a public primitive: derive the flight request for the mutation's target, run the matched routes' data functions, hand the loaded router to the caller's collect() — any cache (the router's own state, a query client) composes its extraction on top. Start's collector now consumes it; errors are contained per Solid Router's collector convention (flight data is an optimization, never a mutation error). Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(solid-start): require named flight sources, drop the pre-rc.5 fallback @solidjs/web 2.0.0-rc.5 ships the multi-source single-flight protocol, so the feature detection and cast shims bridging unreleased types come out: the client subscribes directly under SOLID_START_FLIGHT_SOURCE, the server registers its collector via registerFlightDataSource unconditionally (the unnamed collectFlightData slot now always belongs to the user), and the @solidjs/web peer floor moves to rc.5. Co-authored-by: Cursor <cursoragent@cursor.com> * test(e2e): expect the named single-flight source header With the pre-rc.5 fallback stripped, the client advertises its named source and the server echoes what it folded: X-Single-Flight is "tsr" on both sides, not the legacy "true". Co-authored-by: Cursor <cursoragent@cursor.com> * chore(solid): bump solid-js, @solidjs/web, @solidjs/signals to 2.0.0-rc.6 Repo-wide (packages, examples, e2e apps, benchmarks) — a scoped bump leaves the workspace mixed, and examples/benchmarks then build workspace solid-start dists (which import registerFlightDataSource, rc.5+) against their own @solidjs/web rc.4 resolution. rc.6 ships the named flight-data source API this branch requires plus the settle-walk fix that unblocks the Solid Query pairing. @tanstack/solid-start's peer floor moves to rc.6. The SSR bench helpers move onto rc.6's wire shape: scripted callers use the data address (`<endpoint>/data/<id>`) — the bare address now answers document traffic with the no-JS convention. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: apply automated fixes --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| react | ||
| scenarios | ||
| solid | ||
| vue | ||
| bench-utils.test.ts | ||
| bench-utils.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
| vitest.react.config.ts | ||
| vitest.solid.config.ts | ||
| vitest.unit.config.ts | ||
| vitest.vue.config.ts | ||
SSR Benchmarks
Cross-framework SSR request-loop benchmarks for:
@tanstack/react-start@tanstack/solid-start@tanstack/vue-start
Each benchmark builds a Start app with file-based routes and runs Vitest benches against the built server handler.
Layout
react/- React Start baseline benchmark + Vitest configsolid/- Solid Start baseline benchmark + Vitest configvue/- Vue Start baseline benchmark + Vitest configvitest.react.config.ts,vitest.solid.config.ts,vitest.vue.config.ts- per-framework aggregate configs that run the baseline first, then scenario projectsscenarios/<scenario>/<framework>/- isolated scenario apps
Scenario app layout:
scenarios/<scenario>/<framework>/
vite.config.ts
speed.bench.ts
tsconfig.json
src/
router.tsx
routes/
routeTree.gen.ts
Each scenario uses one app per framework instead of sharing routes in the baseline app. This keeps route-tree size, middleware, Start options, and generated route trees isolated so one scenario cannot shift another scenario's numbers. The existing baseline apps and bench names stay stable for CodSpeed continuity.
Scenario Responsibilities
Each scenario isolates one Start server-side responsibility so benchmark changes can be attributed to a specific feature area.
| Scenario | Start server-side responsibility |
|---|---|
react/, solid/, vue/ baseline apps |
Document SSR for nested file routes, route matching, search parsing, and full-page HTML response generation. |
assets |
Per-request asset pipeline work: CSS inlining, CDN asset URL transforms with uncached manifest resolution, and response Link header collection for early hints. |
before-load |
Nested beforeLoad execution: sequential per-match context building, context merging across matches, and context consumption by loaders during document SSR. |
control-flow |
Loader-thrown redirect, notFound, plain errors, unmatched routes, and route headers() emission, including HTTP status selection, redirect location headers, route error boundaries, and not-found HTML rendering. |
global-middleware |
Global createStart middleware registration: request middleware wrapping document SSR, server-function, and server-route requests, plus global function middleware on server functions. |
head |
Nested route head evaluation, title/meta/link serialization, and head-entry deduplication during SSR. |
loaders |
Nested route loader execution, loader deps from search params, router context reads, and dehydrated loader payload generation. |
rewrites |
Composed location rewrites from router basepath plus locale input/output rewrites; unprefixed URLs redirect to /app/* when the basepath output rewrite canonicalizes them. |
serialization |
Dehydration and RPC serialization of rich non-plain-JSON types: seroval native types in loader payloads, custom serialization adapters, and shallow-error serialization. |
selective-ssr |
Route-level ssr modes: rendered server HTML with ssr: true, dehydrated data without HTML with ssr: 'data-only', and client-only omission with ssr: false. |
server-fn-transport |
Non-JSON server-function transport: multipart/FormData request decoding, raw Response returns, and RawStream streamed responses through the binary frame protocol. |
server-fns |
createServerFn GET/POST request handling, thrown redirect/notFound results, sendContext serialization, SSR-time direct calls, middleware context, input validation, and URL discovery. |
server-routes |
File route server.handlers dispatch for parameterized JSON API routes without document HTML rendering. |
server-routes-middleware |
Server route request middleware chains, middleware-provided context merging, and handler access to accumulated context. |
streaming |
Deferred loader data, Await/Suspense fallback output, larger streamed HTML body scanning, streamed HTML ordering, and later dehydration payload emission. |
Run
Run all benchmarks through Nx so dependency builds are part of the graph:
pnpm nx run @benchmarks/ssr:test:perf --outputStyle=stream --skipRemoteCache
Run framework-specific benchmarks:
pnpm nx run @benchmarks/ssr:test:perf:react --outputStyle=stream --skipRemoteCache
pnpm nx run @benchmarks/ssr:test:perf:solid --outputStyle=stream --skipRemoteCache
pnpm nx run @benchmarks/ssr:test:perf:vue --outputStyle=stream --skipRemoteCache
Build framework-specific benchmark apps:
pnpm nx run @benchmarks/ssr:build:react --outputStyle=stream --skipRemoteCache
pnpm nx run @benchmarks/ssr:build:solid --outputStyle=stream --skipRemoteCache
pnpm nx run @benchmarks/ssr:build:vue --outputStyle=stream --skipRemoteCache
Typecheck benchmark sources:
pnpm nx run @benchmarks/ssr:test:types --outputStyle=stream --skipRemoteCache
Run one scenario app manually through Nx:
pnpm nx run @benchmarks/ssr-<scenario>-<framework>:build:ssr --outputStyle=stream --skipRemoteCache
pnpm nx run @benchmarks/ssr-<scenario>-<framework>:test:types:ssr --outputStyle=stream --skipRemoteCache
Use react, solid, or vue for <framework>. The baseline projects use @benchmarks/ssr-<framework> without a scenario segment.
Request Conventions
- Document GET loops use
accept: text/html, matching the baseline request shape. - Server-function loops must include
sec-fetch-site: same-originso the default CSRF middleware accepts the request. - Loops that expect non-200 responses pass a custom
validateResponsetorunRequestLoop. - Bench loops must build deterministic requests from the seeded random helper and consume response bodies through
runRequestLooporrunSsrRequestLoop.