Skip to content

Conversation

@Sheraff
Copy link
Contributor

@Sheraff Sheraff commented Feb 1, 2026

No description provided.

@netlify
Copy link

netlify bot commented Feb 1, 2026

👷 Deploy request for tanstack pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ad28f24

@Sheraff Sheraff marked this pull request as draft February 1, 2026 12:15

We improved TanStack Start's SSR performance dramatically. Under sustained load (100 concurrent connections, 30 seconds):

<!-- these are matteo's numbers, they don't look amazing (low throughput), maybe we should use our own numbers? we'll cite his in the conclusion anyway. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes use our own so we can actually compare this to later measurements

// After: server gets a simple snapshot
function useRouterState() {
if (isServer) return router.store // no subscriptions on the server
return useStore(router, { ... }) // regular behavior on the client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a comment that isServer is static and thus rule of hooks does not apply here /or is not violated


### The mechanism

Client code cares about bundle size. Server code cares about CPU time per request. Those constraints are different (this is a _general_ rule, not a _universal_ one).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats 'general' vs 'universal' ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants