-
-
Notifications
You must be signed in to change notification settings - Fork 288
feat(blog): Start SSR performance article #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(blog): Start SSR performance article #692
Conversation
👷 Deploy request for tanstack pending review.Visit the deploys page to approve it
|
|
|
||
| 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. --> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats 'general' vs 'universal' ?
No description provided.