Next.js 16.5 compiles 4.2x faster. This blog got 1.35x
Next.js 16.5 on a 92-page static site with 2 cores: cold Turbopack compile went from 7.0 s to 5.2 s with 21% less memory. Not 4x. Warm builds didn't move.
By Meet ModiThe Next.js 16.5 post says cold compiles are 4.2 times faster. Their test app is Vercel's own dashboard, on a 30-core machine with 60 GB of RAM, where a cold compile used to take 183 seconds. This blog is 92 static pages, and the machine I tested on has 2 cores. Same upgrade, different universe.
So what does Next.js 16.5 do for a normal-sized app? I copied this site twice, put one copy on 16.4.6 and the other on 16.5.0, and built each three times cold and three times warm. Cold compiles got 1.35 times faster and used 21% less memory. Warm builds didn't change. The output also got 44 files smaller, which the release post doesn't mention. Then I tried the two new things you can actually poke at without a Vercel account: next build --analyze and Go Route Handlers. Both had a surprise.
What's new in Next.js 16.5
- Faster Turbopack builds: better use of all cores, scaling to thousands of routes, and less memory and disk.
- Cross-deployment caching: functions marked 'use cache: remote' can reuse entries from the previous deployment if their code and the env values they read haven't changed.
- next build --analyze writes the bundle report from the production build itself, instead of a second compile.
- Turbopack's cache garbage collector, experimental in 16.4, is on by default.
- <Link prefetch="navigation"> prefetches content a page would otherwise defer with await navigation().
- next upgrade --ci sets up a GitHub Actions workflow where Codex or Claude Code opens upgrade pull requests.
- Experimental: Go Route Handlers, and a sandboxed "safe mode" for image optimisation.
The v16.5.0 release notes on GitHub are much longer, and they are where the output change hides.
How much faster are Turbopack builds in Next.js 16.5?
The setup: this site at its current commit, exported with git archive into two directories, npm ci, then next and eslint-config-next pinned to 16.4.6 in one and 16.5.0 in the other. Static export, 92 pages, Node 22, on a 2 vCPU GitHub Actions runner with 7 GB of RAM. Cold means .next deleted first. Warm means only the output deleted. Builds ran one after another with nothing else on the machine.
wall (s) compile (s) peak RSS (KB)
16.4.6 cold 16.27 15.91 16.03 7.1 6.9 7.0 770572 777756 775712
16.5.0 cold 14.04 13.76 13.70 5.3 5.2 5.1 608388 594308 624484
16.4.6 warm 5.93 5.47 5.70 0.517 0.447 0.446
16.5.0 warm 5.71 5.69 5.50 0.449 0.393 0.402
.next/cache after the runs: 16.4.6 52M 16.5.0 43MCold compile: 7.0 s down to 5.2 s, 1.35 times faster. The whole cold build: 16.1 s down to 13.8 s, 14% less. Peak memory of the biggest process: 21% less. Cache on disk: 17% smaller. Warm builds: the same, because the compile was already under half a second and the rest is rendering 92 pages, which Turbopack doesn't do.
The memory and cache numbers are close to Vercel's (they report 38% less memory cold and a 14% smaller cache). The speed number is nowhere near. Vercel says most of the work went into using every core and scaling to thousands of routes, and a 2-core runner building 92 pages has little of either to give. That is my guess at the gap, not something I tested on a bigger machine. If your CI runner is small and your app is small, expect something like my numbers, not theirs.
The 44 files that disappeared from out/
The 16.5 export had 363 files where 16.4.6 had 406. Gone: 44 files called __next._full.txt, one per route (and one JavaScript chunk was added). Each of the 44 was a byte-for-byte copy of the route's own .txt payload:
# 16.4.6 export
$ md5sum about.txt about/__next._full.txt
f7cebc918ee735e23b3eb576b42f1102 about.txt
f7cebc918ee735e23b3eb576b42f1102 about/__next._full.txt
$ ls out/about/ # 16.4.6
__next._full.txt __next._index.txt __next._tree.txt __next.about.__PAGE__.txt opengraph-image
$ ls out/about/ # 16.5.0
__next._index.txt __next._tree.txt __next.about.__PAGE__.txt opengraph-imageThat is pull request #101832 in the release notes, "Avoid full-segment writes without Cache Components". The export got 1.38 MB smaller. JavaScript was the same give or take 6 KB. I checked the build, not client-side navigation in a browser, so if you have a static export, click around once after you upgrade.
What next build --analyze actually costs
--analyze writes the bundle report to .next/diagnostics/analyze during the real build, 11 MB of it for this site. It's the tool I'd want for the kind of bundle work behind a TBT fix. But the first --analyze build after a plain one compiled in 4.7 s, close to cold. So I alternated:
plain ✓ Compiled successfully in 152ms
plain ✓ Compiled successfully in 152ms
analyze ✓ Compiled successfully in 4.4s
analyze ✓ Compiled successfully in 172ms
plain ✓ Compiled successfully in 3.9sEach switch throws the warm cache away. On this site that's 4 seconds. On an app where a cold compile is minutes, a CI job that runs --analyze on one step and a plain build on another, against the same cache, pays for a cold compile twice. Pick one and use it for every build, or give the analyze job its own cache.
Go Route Handlers in Next.js, tried
You set experimental.goRoutes to true, install Go 1.24 or later, and drop a route.go next to your TypeScript routes. I used the release post's own hello handler. On this site, the first thing that happened was this:
> Build error occurred
Error: `route.go` and `proxy.go` do not support `output: "export"`
at assignDefaultsAndValidate (node_modules/next/dist/server/config.js:378:19)Fair enough: a static export has no server to run a binary on. Note the proxy.go in that message, which the release post doesn't mention. So I took output: "export" out of a copy and built again:
✓ goRoutes
✓ Compiled successfully in 34.7s
├ ƒ /api/hello
$ ls -la .next/server/go-routes-*
-rwxr-xr-x 1 runner runner 8339128 .next/server/go-routes-43f2b45c8223c1b23e69310998fc7206
$ curl -si http://127.0.0.1:3917/api/hello
HTTP/1.1 200 OK
content-type: text/plain; charset=utf-8
Hello from Go!
$ curl -si -X POST http://127.0.0.1:3917/api/hello
HTTP/1.1 405 Method Not AllowedIt works. next start runs the binary as a child process, about 6 MB resident, and routes /api/hello to it. A POST gets a proper 405 because only GET is defined. When I stopped next-server with SIGTERM, and again with SIGKILL, the Go process went with it, so no orphans. The manifest next to the route records goos linux and goarch amd64, the machine that built it. I only built on Linux, so I don't know what happens if you build on a Mac and deploy the output to Linux.
The catch: the cold compile cost of one Go file
That hello route, three lines of Go, took the cold compile from about 5 seconds to 34.7. I didn't split out how much of that is the Go toolchain and how much is Turbopack, and I didn't test a warm Go cache. A fresh CI checkout is where you pay it. It's an experiment, it says so, and it's not for anything that ships with output: "export" anyway.
- Cross-deployment caching needs 'use cache: remote' and a remote cache, which in practice means Vercel's Runtime Cache or your own handler. I couldn't try it here. Note the fallback: any dynamic process.env access, like process.env[name], drops a function back to a per-deployment key, silently.
- next upgrade --ci wants an OpenAI, Anthropic or Vercel AI Gateway key, or a Claude subscription, and opens a pull request to add a workflow. I only read its help. The "security" policy is the one I'd start with: an agent opening a PR for every stable release is a lot of review for a small app.
- imgOptSafeMode does nothing for a site with images.unoptimized, like this one, and the docs say it may be ignored on platforms with their own image service.
How to upgrade to Next.js 16.5
npm install next@latest eslint-config-next@latest
rm -rf .next # measure from cold once, so you know your real number
time npx next buildThe copy of this site needed no code changes. The build passed, the page count matched, and the only difference in the output was the duplicate payload files. Run your own cold build before and after. It takes two minutes and tells you which of the two benchmarks you live in.
What's new in Next.js 16.5?
Faster and leaner Turbopack builds, cross-deployment caching for 'use cache: remote', next build --analyze, Turbopack cache garbage collection on by default, per-link prefetch="navigation", and next upgrade --ci for agent-driven upgrade pull requests. Go Route Handlers and a sandboxed image optimisation mode arrive as experiments. Version 16.5.0 became latest on npm on December 2, 2026.
Is Next.js 16.5 faster than 16.4?
Yes, for cold builds. On a 92-page static site with 2 cores, the cold Turbopack compile dropped from 7.0 to 5.2 seconds and the whole build from 16.1 to 13.8 seconds, with 21% less peak memory. Warm builds did not change. Vercel's 4.2x figure comes from its dashboard on a 30-core machine.
How do I upgrade to Next.js 16.5?
Run npm install next@latest eslint-config-next@latest, then do one cold build with the .next folder deleted so you can compare. You can also run npx next@canary upgrade --agent=latest to let a coding agent do it. A copy of this site built on 16.5.0 with no code changes.
Do Next.js Go Route Handlers work with static export?
No. With output: "export" the build stops with the error that route.go and proxy.go do not support it. Without static export they work: Next.js compiles the Go code into one native binary, which next start runs as a child process. The feature is experimental and needs experimental.goRoutes set to true and Go 1.24 or later.
What does next build --analyze do?
It writes a bundle analysis report to .next/diagnostics/analyze during the production build, so the report matches exactly what you ship and you skip a second compile. In my tests it does not share the compile cache with a plain next build, so alternating between the two costs a near-cold compile each time.
What is cross-deployment caching in Next.js 16.5?
Functions marked 'use cache: remote' now get cache keys built from their own code, the code they import and the environment values they read, instead of the deployment ID. If none of that changed, a new deployment reuses the old entries. Dynamic process.env access falls back to the old per-deployment key.
- Next.js 16.5, Next.js
- Release v16.5.0, GitHub (vercel/next.js)
- next on the npm registry, npm
More Posts
I made a post-quantum SSH key. GitHub never answered it
A post-quantum SSH key is one ssh-keygen command in OpenSSH 10.6. GitHub, GitLab, Bitbucket, Codeberg and sourcehut can't use it, and GitHub just hangs.
I painted over a 4-digit code and read it back from the pixels outside the box
Can you unredact an image? From lossy WebP, yes: I got a hidden 4-digit code back from pixels 96 px outside the box. JPEG with a 16 px margin leaked nothing.
I reran Laravel Rust's 18x benchmark. Most of the gap is Eloquent
Laravel Rust served 1,243 req/s to Laravel PHP's 86 on one core in my rerun. Swap Eloquent for the query builder and PHP reaches 543. Here is the gap.