Back to results for “Performance”
Next.js › Turbopack & Build Performance

How does Turbopack achieve faster build and refresh times compared to older bundling tools?

Intermediate

Answer

Turbopack uses an incremental computation approach, caching the results of previous work at a very fine grained level, so when you change a single file, it only reprocesses that file and the specific parts of your application affected by the change, rather than rebuilding the entire application from scratch.
// Turbopack caches function-level and module-level results
// so only changed code paths are recomputed on save
Real-world example A team working on a large e-commerce site notices that saving a small change to a single component reflects in their browser almost instantly, thanks to Turbopack only reprocessing what actually changed.

Common follow-ups: What programming language is Turbopack itself written in?;How does this incremental approach compare to how Webpack handles rebuilds?