It's mostly because a lot of the web tooling is written in JavaScript. The build times for the "next generation" tools written in Rust/Go are dramatically faster.
We went through a very similar migration. Had a Next.js landing page and a separate TanStack Router SPA - consolidated both into a single Vite + TanStack Start app. Same experience with build times and the architecture mismatch: our app is heavily client-side with real-time state, and fighting Next.js's server-first assumptions wasn't worth it. TanStack Router's type-safe routing and file-based route generation have been great.
I have a Nextjs heavy app which takes around 7 minutes currently. But I've been thinking of moving away from next for a long time now. TanStack seems to be a good fit. This gives me a bit more confidence in just doing it.
I recently switched from NextJS — where every one of the dozens of projects I built would have 7-8 minute deployment times, regardless of hosts — to React Router, and saw my deployment times drop to 1-2 minutes.
Aside from some difficulty with mastering environment variables, I’ve been delighted with the change and will probably not look back.
Anyone tried to use vinext from Cloudflare in production? Might be faster.
But seriously, not sure why NextJS builds take so much, we are using stable and functional pages router in DollarDeploy and it is still takes too much time to build.
The irony is deploying NextJS on the railway platform is super slow since they use containers, on Vercel 2 min is like 12 min on railway, deployments on a vps are only like 20 seconds.
*I know this is just build time, so this is different then their deployement time
Is the quality of software engineers really dropped that low that people get excited when they move off from "heavy bloated" frameworks to lighter alternatives? Or is this just SEO farming garbage to position the company higher in search results?
A lot of the LLMs are very familiar with next.js and vercel is also aggressively building an ecosystem around their tooling for LLMs. So I wonder if this problem will only be exacerbated when everyone using LLMs is strongly nudged (forced) to use next?
There are some easy optimizations wins for this page but none of the top ones are framework related. Maybe with the faster build times they can easily optimize images and 3rd party dependencies. As someone else pointed out, nearly half that data is unoptimized images.
For the curious, google's current homepage is a 200kb payload all in, or about 50 times smaller.
FWIW with pretty aggressive uBlock setup its "just" 7MB and 1.6s to load, so it might be just their love for analytics, tracking, measuring and lack of smart code splitting thats killing the performance.
I migrated the landing pages for my app[1] from Nextjs to Astrojs mainly because I was paying Vercel $20 per month for serving static pages(it’s 4 times more than I pay Railway for the Postgres database for the actual app and also 4 times more than I pay Cloudflare for hosting all my apps). I used AI for migrating and it took a few days only as the existing repo was used as “instructions” and it included some upgrades and improvements here and there.
This is the kind of post I wish more teams would write. The "we picked the popular thing and it got slow" story is so common. But most teams just live with it. They don't want to touch it. 10 minutes to 2 minutes is huge for dev speed!
I'm a huge fan of tanstack start especially the ability to just static prerender some paths (a feature I'm missing a ton with astro)
For me tanstack start is the new dominator on the stack!
50 comments
[ 1.6 ms ] story [ 63.2 ms ] threadNext.js is produced by Vercel, a competitor to Railway.
Aside from some difficulty with mastering environment variables, I’ve been delighted with the change and will probably not look back.
But seriously, not sure why NextJS builds take so much, we are using stable and functional pages router in DollarDeploy and it is still takes too much time to build.
*I know this is just build time, so this is different then their deployement time
Is the quality of software engineers really dropped that low that people get excited when they move off from "heavy bloated" frameworks to lighter alternatives? Or is this just SEO farming garbage to position the company higher in search results?
page actually took 17s to fully render with multiple shift changes.
all to render a domain search bar similar to google home page.
https://railway.com/domains
All my projects are server rendered with jinja/minijinja, bootstrap, jQuery, and htmx when I need a little bit of SPA behavior on forms.
No builds, just static <script src= tags. Very fast and easy. I'll never recommend anything else.
[0] https://railway.com/dots-oxipng.png
For the curious, google's current homepage is a 200kb payload all in, or about 50 times smaller.
[1]: https://www.sqlai.ai/
Then you can even run multiple projects off the same server.
I'm a huge fan of tanstack start especially the ability to just static prerender some paths (a feature I'm missing a ton with astro) For me tanstack start is the new dominator on the stack!