Tanstack start performance
I had a general question
Is tanstack start currently slower on vercel than nextjs on vercel?
I am using everything supabase and postgres on both end but seeing some load performance drop when using SSR
11 Replies
genetic-orange•3mo ago
how do you define and measure performance?
metropolitan-bronzeOP•3mo ago
I compared with a previous blog website i made with nextjs that uses pages router
And current project uses tanstack start
Previous: blogsansar.vercel.app
Current: sagarmathalabs.com
For the later site i used cloudflare
Sorry for the trouble but i think the issue must be with the bundle too
I am importing react markdown so it may have caused this
Do you have any suggestion how can i handle this?
genetic-orange•3mo ago
what kind of performance are you looking at here.
there are so many metrics...
metropolitan-bronzeOP•3mo ago
Its just the initial page load
genetic-orange•3mo ago
until the first html arrives?
genetic-orange•3mo ago
maybe that's relevant
https://x.com/schanuelmiller/status/1918796648328597646?t=Xglrd4oDHH0xoIUMYLyHAw&s=19
Manuel Schiller (@schanuelmiller)
If your server-side rendering feels suspiciously slow, check NODE_ENV. React only loads the production build if it is explicitly set to 'production'. Learned this the hard way.

X
xenial-black•3mo ago
Thanks for the post Manuel!
Did not know about this.
Does this have any impact on local development? It usually takes 20-30 seconds from running pnpm dev to i can actually interactiv with my app
genetic-orange•3mo ago
you should not set this when running dev locally
can you share some more details about your app? amount of routes etc?
you can also enable debug logs for vite so get an idea what it is doing via the env var DEBUG=*
xenial-black•3mo ago
I shared the log 🙂
I usually just wait for the tanstack devtools icon to appear before i start interacting with my app.
And it takes all the way from 10-30 seconds from a cold pnpm dev before those icons appear.
when already in dev mode, if i reload the page, it can take 5-10 seconds before the icons appear - and the app is ready to be interacted with (see last video).
Amount of routes
/ (landing)
/slug
/slug/issues,projects,users,settings etc
In total maybe 10-15 routes.
What happens if i interact with app before the icons appear
Links does not work, and they can sometimes append weird params to my current url
xenial-black•3mo ago
genetic-orange•3mo ago
that log is just some tailwind log, not the output from vite