Folklore · Rentstag · michal.design · Post

Leaving Next.js

Three apps, two days, 29 messages. What got faster, what got worse, and what fixed it.

Before and after, on real deploysVercel, 13–18 November. Server memory measured on my Mac.
  • Next.js
  • Now
  • Got worse

Build on Vercel

Folklore website
52 s
26 s
2.0× better
Folklore Manage
81 s
37 s
2.2× better
Folklore MCP
30 s
25 s
17% better
Rentstag admin, build step
148 s
54 s
2.7× better
michal.design
14 s
17 s
26% worse

Push to live, queue to deployed

Folklore website
120 s
28 s
4.3× better
Folklore Manage
152 s
30 s
5.1× better

Opening a page, Folklore website

First visitmedian of 8 festival pages
0.8 s
0.26 s
3.1× better
Second visitfrom the CDN
0.19 s
0.19 s
same
Page size
211 KB
163 KB
23% better

Opening a page, Rentstag sign-in

HTML ready
510 ms
371 ms
27% better
JavaScript transferred
1,569 KB
634 KB
2.5× better
Requests
82
56
32% better

Server memory while serving pages

Rentstag admin
629 MB
316 MB
2.0× better
michal.design
368 MB
192 MB
1.9× better

Why I moved

All three apps are mine. Folklore is the festival app I co-founded. Rentstag is another company I co-founded, with Andrzej Karasek. michal.design is this site.

I noticed my agents spend a lot of their day waiting for builds. They push dozens of previews a day, and each one waits in a queue, then builds. Rentstag's admin took 89 seconds and 8 GB of memory to build, and 1 in 13 Vercel builds ran out of memory: we were at the edge of the cheapest build machine. This was not a neglected setup. We were on the latest Next.js and had already tuned it a lot. Folklore's two apps still rendered 327 pages on every build, and a type check of the whole repo took more than two minutes.

I'm not the first. Railway moved 200+ routes off Next.js, and its builds went from over 10 minutes to under 2. Inngest cut its local page loads from 10–12 seconds to 2–3.

The bet

Spend a little extra agent usage once. In return: much faster builds, a little less on Vercel and Cloudflare, and faster iteration every day after. I started with Folklore. The gains were big enough that I moved Rentstag and this site the next day, and most of my client apps are next, over the coming weeks.

What moved

  • Folklore: the website, Manage (the admin festival organisers use) and the MCP server AI agents call. They didn't even run on the same thing: Bun installed the packages, Vercel ran one app on Node 24, and the checks ran on Node 26. Now the website and Manage run on TanStack Start and Vite, the MCP server on plain Bun with no framework, all three on Bun, next to the database in Frankfurt.
  • Rentstag: the simple one. One admin, from Next.js to TanStack Start and Vite.
  • michal.design: already on TanStack Start. It moved from pnpm and Node to Bun, and its linting from ESLint to Oxlint. I meant to switch it to Biome, but for a site this small Oxlint fits better: it keeps the ESLint rules I had, at 7 times the speed.

Every move had a scorecard before any code changed: today's numbers, my guess, and a pass line. Same Mac, same script, same pages. The actual numbers went in after. Some of my guesses were badly wrong, which is the point of writing them down.

What got faster

On my MacSame Mac, same script, medians of cold runs.
  • Next.js
  • Now
  • Got worse

Folklore

Website build
34 s
2.6 s
13.0× better
Manage build
38 s
5.4 s
6.9× better
Type check, whole repo
131 s
6.2 s
21.1× better
Manage dev server ready
23 s
5 s
4.6× better
Build peak memory, Manage
7.7 GB
2.1 GB
3.7× better
JavaScript on map pages
511 KB
262 KB
2.0× better
Phone busy on the home page
531 ms
26 ms
20.4× better

Rentstag admin

Build
89 s
20 s
4.6× better
Sign-in page response
27 ms
12 ms
2.3× better
JavaScript, all chunks
4.9 MB
2.9 MB
1.7× better
Dev server memory
2,656 MB
1,911 MB
28% better
Build peak memory
8.4 GB
9.4 GB
12% worse
Type check
35 s
4.7 s
7.4× better
Dev server, first pageopened 10 s after start
7.1 s
0.7 s
10.1× better

michal.design

Lint
7.4 s
1 s
7.4× better
Lint memory
2.3 GB
0.7 GB
3.3× better
Requests a second
690
1,080
1.6× better
End-to-end tests
40 s
33 s
16% better
Install, empty cache
15 s
16 s
9% worse

Folklore is the big win. The website builds 13 times faster, Manage 7 times, and the type check went from 131 seconds to 6. On Next.js we leaned on static and incremental rendering, so every build rendered hundreds of pages ahead of time. TanStack Start renders a page on its first visit and the CDN keeps it, so the build skips that work, and a first visit still got quicker: 0.26 seconds instead of 0.8. On a phone the home page used to keep the processor busy for half a second. Now it is 26 milliseconds.

On Vercel, Manage goes live in 30 seconds instead of 2 and a half minutes, and the website in 28 instead of 2. The build cache Vercel stores after every deploy shrank by a third.

Rentstag's admin builds in 54 seconds instead of 2 and a half minutes. A whole deploy, with a warm cache, takes 107 seconds instead of a typical 154: installing packages and deploying the database now take most of the time. One of those builds waited 15 minutes in line before it started. Its sign-in page used to load AG Grid, the table library, on every page. Now it loads only where a table appears, so the page sends 634 KB of JavaScript instead of 1,569, in 56 requests instead of 82. On my Mac its server needs half the memory.

The second round found real bugs on the way: deleting a recurring payment always failed, tenants saw 'Amount due' with no numbers, and a statement attachment's type didn't save. All fixed.

What got worse, and what fixed it

What got worse, and what fixed itBefore the move, right after it, and after the fix.
  • Before
  • Worse
  • Better
  • Fixed

Fixed

michal.design, lint memory
Node, ESLint: 1.5 GB
Bun, ESLint: 2.4 GB
Bun, Oxlint: 0.7 GB
Folklore Manage, sign-in page JavaScript
Next.js: 756 KB
First port: 698 KB
After a clean-up round: 578 KB
Rentstag, dev server first page
Next.js: 7.1 s
First port: 11 s
Warmed at start: 0.7 s

Not fixed yet

Folklore MCP, waking up after idle
Next.js, Virginia: 1.8 s
TanStack Start, Virginia: 2.4 s
Plain Bun, Frankfurt: 2.7 s
Folklore MCP, once awake
Next.js, Virginia: 0.25 s
TanStack Start, Virginia: 0.37 s
Plain Bun, Frankfurt: 0.14 s
Rentstag, build peak memory on my Mac
Next.js: 8.4 GB
TanStack Start: 9.4 GB
Tamagui extraction off: 3.9 GB
  • Bun made linting on this site use more memory, 2.4 GB instead of 1.5. Oxlint fixed it: 0.7 GB, and 1 second instead of 7.
  • Folklore Manage barely got lighter at first. Its sign-in page loaded 756 KB of JavaScript on Next and 698 KB after the port. One clean-up round took it to 578 KB: analytics loads when the browser is idle, and the data grid and map load when you open them.
  • The MCP server got slower to wake up, and it is not fixed. After sitting idle, its first answer took 1.8 seconds on Next, 2.4 on TanStack Start and 2.7 on plain Bun. Once awake, plain Bun in Frankfurt answers in 0.14 seconds, faster than Next ever did. An agent often makes its first call after a quiet spell, so the wake-up is what it feels.
  • Rentstag's dev server showed its first page in 11 seconds instead of 7. Fixed in a second round: the dev server now loads the sign-in page and everything it imports as soon as it starts, so the first page opens in 0.7 seconds.
  • Rentstag still peaks at 9 GB building on my Mac. On Vercel it no longer runs out of memory on the standard machine, and its build step takes 54 seconds instead of 2 and a half minutes. The bundler was never the problem: the Tamagui and React compilers are. With Tamagui's style extraction off it takes 3.9 GB, but styles get slower in the browser, so that is a design decision, not a fix.

Two smaller ones: Bun installs a little slower on an empty cache, and this site builds 3 seconds slower on Vercel since the switch. Not worth undoing.

Biome, Oxlint, ESLint and TypeScript

The newer tools are all much faster than the old ones. They are written in Rust or Zig and use every core. Which one wins depends on the project.

  • ESLint is the old default, with the most plugins. It is also the slowest: 7.4 seconds on this small site.
  • Oxlint runs your ESLint rules 7 times faster and found 16 of its 18 warnings here. Best when the project is small and you want to keep the rules you have.
  • Biome lints and formats in one tool, with one config. On Folklore it checks the whole repo in 0.65 seconds. Oxlint needed 1.9, plus 2.1 for its formatter, with two configs to keep. Best for a big repo. Biome stayed.
  • TypeScript 7, the new native compiler, cut Folklore's type check from 131 seconds to 45. A big jump, but not enough there: Bun's own check takes 6 seconds, and it found four type mismatches the old one missed. On Rentstag, TypeScript 7 alone was enough: 34.8 seconds to 4.7, and it now runs on every pull request.
  • Rentstag's admin had 1,148 type errors. Not a Biome setting: Biome lints and formats but doesn't check types, and neither does Bun. Nothing type-checked the admin in CI, so errors piled up in the shared packages for months, and an unused option in the shared Tamagui config made its type depend on itself, which broke styling types everywhere. TypeScript 7 now guards every pull request, the loop is gone, and all 1,148 are fixed without changing how the app looks.

The lesson is to compare with what you use, not with the old default. Oxlint beats ESLint. It does not beat Biome.

What it cost

Whose time it tookFrom the session logs, 13–18 November. My time is reading and replying.
  • My time
  • Agent time

Hours

Folklorewebsite, Manage, MCP
Me: 1.6 h
Agents: 12 h
Rentstagadmin
Me: 0.4 h
Agents: 3 h
michal.designBun, Oxlint
Me: 0.3 h
Agents: 0.9 h

Agents did the work: 15.6 hours of it, next to everything else. My part was 29 messages, about 490 words, and 2.3 hours of reading and replying. Most messages were one line: 'yes, merge it', 'skip it', 'test the prod please'. The agents asked before anything risky, I checked the previews, and I stopped waste. One agent wanted to test all 1,300 pages; I asked for a random handful. That is why there are so many messages with so few words.

tokens, almost all cheap rereads
1.5 billion
the same tokens at API prices
$370
of a month on a $200 plan
≈ 3%
a developer by hand, my guess
$14–24k

I don't pay API prices: it ran on a subscription. A $200 a month plan covers, by my estimate, about $12,000 of API-priced use, so this move used about 3% of a month, roughly $6. By hand I'd guess six to ten weeks for one developer: the three moves added 34,000 lines across more than 1,600 file changes. At $60 an hour that is $14,000 to $24,000.

What it saves

Waiting removed, a monthMeasured saving per run, times my guess of runs a day, 20 workdays.
  • Hours saved
  • Hours lost

Hours a month

Folklore type checks125 s × 20 a day
15 h
Rentstag Vercel builds47 s × 29 a day
11 h
Folklore preview waits1.7 min × 18 a day
7.7 h
Rentstag local builds70 s × 10 a day
4.3 h
Folklore local builds32 s × 10 a day
2 h
michal.design lint6.4 s × 50 a day
2 h
michal.design Vercel3.6 s × 8 a day
-0.2 h

About 42 hours a month of waiting for builds, checks and deploys. The Vercel bill only drops by around $14 a month, because build minutes are cheap, and the GitHub Actions bill, which was getting high, drops with the faster checks. Counted on a subscription, the move pays for itself within two weeks. Counted in time, it paid back in the first week.

What's next

  • Rentstag's build memory. We use Tamagui so one set of components runs on iOS, Android and the web, and its compiler is what needs the memory. Tamagui 3 is a lot better, but moving means rewriting about 8,500 style values in 455 files and an Expo upgrade, so it is its own project. Next: run its compiler only where it pays, and set up the React Compiler properly, only on the screens that need it.
  • The queue. Rentstag builds wait in line before they start, and 1 in 10 waits more than 12 minutes. The next minutes saved are in how many builds run at once.
  • The MCP server's wake-up: keep one copy warm, or try it on Node and see whether the slow start is the runtime or the code.
  • Installs. A cold install takes a minute, longer than the framework build itself.
  • TypeScript 7 and Nitro 3, the server layer under TanStack Start, both look good. Nitro is still a release candidate, so it stays pinned for now.

The framework matters less than I thought. Once the build stopped rendering pages, the slow parts were the compilers, the installs and the queue. The bigger change is how cheap a move like this has become. Swapping the framework under three apps used to be weeks of work for a team. This took two days of agents and a few hours of my attention, so the stack is now a decision you can undo.

Try it on yours

Every project is different, so measure yours. Here is the prompt I would start with. Paste it into Claude Code, or any coding agent, in your project.

The prompt
Move this project to the fastest stack that fits it, and prove it with numbers.

1. Before you change any code, write a scorecard: build time (locally and on the host), type check, lint, dev server start, first and second page load, JavaScript size, and server memory. Measure today's numbers three times, write your guess for each, and a pass line.
2. Try TanStack Start with Vite in place of Next.js, Bun to install and run it, and a faster linter: Oxlint for a small project, Biome for a big one.
3. Keep every page, route and behaviour the same. Check it on a preview deploy, not only locally.
4. Fill in the scorecard. Show what got worse too, and keep the old tool wherever it wins.
5. Open one pull request with the scorecard at the top.

You can feel the result here: this site runs on the same stack. So does the new Folklore website, where a page you haven't opened before now loads in a quarter of a second. The Folklore case study tells the rest.

In short: 42 hours of waiting gone every month, $14 a month off Vercel, 2.3 hours of my time and about 3% of a month of my plan. I have had a really good time with TanStack Start, Bun, Biome and Oxlint. My sites got faster, cheaper and nicer to work on.

The rest of my work, case studies included, sits behind a password, one per application.

Open the portfolio