The Problem With Traditional Bundlers
Webpack and most traditional bundlers are push-based: when you start the dev server, they process the entire dependency graph, bundling everything upfront. For a large application, this means waiting 30-60 seconds before you can see anything. Every save rebuilds what changed plus everything that depends on it.
As applications grow, this startup time and rebuild time grows with it. The cost is paid whether or not the developer ever navigates to that part of the app. Bundling a route you haven't opened yet is wasted work.
Demand-Driven Compilation
Turbopack is pull-based. It doesn't bundle anything until it's requested. When the dev server starts, it does minimal work. When you navigate to a route, Turbopack compiles only what that route needs — traversing the dependency graph on-demand and caching the result with fine-grained invalidation.
The cache is the key. Turbopack uses a persistent, content-addressed cache that invalidates at the granularity of individual modules. If you change one file, only the compilation units that depend on that specific file are invalidated. In a large codebase, this means HMR updates that affect a small portion of the graph are nearly instantaneous regardless of project size.
Key takeaways
- Turbopack is demand-driven: it only compiles what the browser requests, meaning startup time stays fast regardless of project size
- The persistent content-addressed cache means HMR only recompiles exactly what changed — in large projects this makes hot reload feel instant even for changes deep in the dependency tree
- Turbopack is stable in Next.js dev mode — enable it with 'next dev --turbopack' and measure your dev server startup and HMR times before and after
Conclusion
Understanding why Turbopack is fast made me appreciate build tooling as a genuine engineering discipline. The demand-driven model isn't just a faster way to do what webpack does — it's a fundamentally different approach to the problem. Worth understanding at the architecture level.
Enjoyed this article?

Vivek Kumar Singh
Technical Expert · Full Stack Cloud Engineer · Tokyo, Japan