Skip to content
ExplainedWeb

Turbopack cuts Next.js builds up to 41% in Zoonk's five-app test

Turbopack in Next.js 16.5 cut Zoonk's clean builds by 17% to 41%. The release changes explain where the gains could come from, and what to test.

By DC Team · · 5 min read

Next.js and Zoonk logos above Same code. Builds up to 41% shorter. Two bars show one tested app's build falling from 20.2 seconds to 12.0 seconds.

Turbopack in Next.js 16.5 shortened Zoonk's production builds across five apps without configuration changes, according to its maintainer's test. Its published benchmark reports reductions of 17% to 41% against 16.4.6. The larger 58% figure is specifically warm-cache compilation for the web app, not its complete build time.

The practical question is whether this upgrade saves time on your own build runner. The release contains concrete changes that make these results plausible. It does not establish which optimization produced each saving at Zoonk. We checked the original chart against the vendor's release notes and implementation details, then recalculated what the reported timings actually buy.

What Zoonk's Turbopack benchmark measures

The chart compares 16.4.6 with 16.5.0 using the same code. It gives medians from three clean next build runs per app on an Apple M4 Max, with versions alternated. These are the reported timings; the percentage column is our calculation from the displayed values.

App16.4.616.5.0Time reduction
Web app61.3 s37.7 s38.5%
API23.9 s17.4 s27.2%
Evals20.2 s12.0 s40.6%
Admin13.1 s10.9 s16.8%
Blog7.8 s5.5 s29.5%

The chart also reports a 14% smaller web-app build cache and a separate CI measurement: median peak RSS falling from 4.5 to 3.4 GiB for the web app plus API E2E build. Keep that CI memory result separate from the laptop timing comparison.

Three alternating runs are more informative than one convenient stopwatch result. Still, the chart does not provide individual run times, dispersion, a benchmark commit, or absolute warm-cache compile times. Treat it as a project maintainer's report, not an independently reproduced performance guarantee. We inspected the chart and checked its arithmetic; we did not rebuild Zoonk.

The release changes attack repeated work

The official Next.js 16.5 announcement identifies better CPU utilization, scaling to thousands of routes, and lower memory and disk overhead as priorities. The 16.5.0 release changelog lists specific changes behind that work. Three are particularly relevant to interpreting a real application benchmark.

First, client-reference manifest construction now shares page-independent work. Previously, pages sharing a client reference repeated lookups for its paths, module identifiers and chunk information. The patch moves those calculations into shared cached tasks. That is a credible route to reducing overhead in apps with repeated components across many pages.

The patch's own measurements also show why isolated optimization claims need care: its author reported no measurable end-to-end difference with the default configuration in an exploratory local test, despite reducing time in the manifest task. Improving one task does not necessarily move the build's finish line.

Second, route loader-tree construction skips nonmatching sibling directories before recursing. The old approach incurred quadratic recursive calls for sibling routes. The change avoids cloning and entering branches that cannot contain the target page. It still performs a per-sibling containment check, so describing it as removing all quadratic route work would overstate the patch.

Third, large cache-restore batches can decode stored task data in parallel. The implementation uses a threshold of 2,048 items and leaves smaller batches sequential. Its synthetic measurements found that parallel decoding could be slower for small batches. A warm cache still requires work to restore; making that work cheaper can matter even when compilation reuses earlier results.

Together, these changes explain plausible mechanisms for improvement. Zoonk's chart does not isolate them. Assigning its 58% result to the decoding patch alone would require a controlled comparison with that patch enabled and disabled.

A faster compiler is only part of a faster build

Vercel's release benchmark makes the distinction visible. On its 30-core, 60 GB machine, cold compilation of its dashboard fell from 183 to 44 seconds. The complete cold production build fell from 325 to 159 seconds. Warm compilation fell from 12.0 to 4.4 seconds, while the full warm build fell from 134 to 107 seconds.

Those results use different hardware and a different application from Zoonk. They are useful context, not a prediction for your project. Both reports support the same measurement discipline: record the compiler's duration and the command's wall time separately.

For a simple illustration, suppose compilation consumes 20 seconds of a 100-second build. Cutting compilation by 58% saves 11.6 seconds. With everything else unchanged, the complete build still takes 88.4 seconds. That is an 11.6% reduction, even though the compiler improvement is much larger.

Rauch's response to the benchmark was optimistic about further gains. It is a vendor reaction, not an additional measurement.

What the five timings save together

Adding Zoonk's displayed medians gives 126.3 seconds before and 83.5 seconds after. That is 42.8 seconds less, or a 33.9% reduction, for a hypothetical serial run of all five apps.

This calculation is not a measured pipeline duration. If jobs run concurrently, adding their durations exaggerates the change in elapsed time. A simplified fully parallel model, with identical job starts and no resource contention, would instead compare the longest jobs: 61.3 versus 37.7 seconds, saving 23.6 seconds.

Use that distinction when making the upgrade case internally. A team waiting for its slowest required job cares about the critical path. A team paying for aggregate compute may also care about the sum, but needs its own runner pricing, billing increments and job topology before turning seconds into dollars. The supplied chart supports time arithmetic, not a cloud bill forecast.

What to do

Create a comparison branch and pin the two framework versions in separate dependency lockfiles. Keep source code, Node version, environment variables, runner size and build command fixed. Avoid changing application dependencies or enabling extra experimental features during the comparison. If your normal pipeline uses a task runner that restores completed build outputs, ensure the benchmark actually executes the framework build.

Test cold and warm conditions separately. The filesystem-cache documentation places production compilation caching under .next/cache/turbopack and says CI must restore .next/cache to benefit. Deleting that directory before every measurement would prevent you from testing cache reuse.

For a conventional single-app project using the default .next output directory, run this from a disposable checkout after installing the selected version. It deletes build output, so do not run it against a development session you need to keep. Save it as compare-builds.cjs and run node compare-builds.cjs:

const { rmSync } = require('node:fs');
const { spawnSync } = require('node:child_process');
const { performance } = require('node:perf_hooks');

function build(label) {
  const start = performance.now();
  const result = spawnSync(process.execPath, [
    'node_modules/next/dist/bin/next', 'build', '--turbopack'
  ], { stdio: 'inherit' });
  if (result.error) throw result.error;
  if (result.status !== 0) process.exit(result.status ?? 1);
  console.log(`${label}: ${((performance.now() - start) / 1000).toFixed(2)} s`);
}

for (let pair = 1; pair <= 3; pair++) {
  rmSync('.next', { recursive: true, force: true });
  build(`cold-${pair}`);
  build(`warm-${pair}`); // Preserve this version's preceding build cache.
}

This records command wall time; use the build log for compilation time. It does not include dependency installation or deployment upload. Adapt the path if your project customizes its output directory, and seed each version's cache with that version's own build. Run the version comparisons in alternating order to reduce ordering bias, and retain every result rather than selecting the fastest pair.

Before merging, verify a production start, representative routes, client navigation and your existing integration tests. Accept the upgrade on correct behavior and a repeatable improvement in the metric your team actually waits for. If compilation improves but pipeline duration barely moves, investigate the remaining stages before buying a larger runner.