Turbopack achieves fast build times through fine-grained incremental computation and automatic dependency tracking using "value cells" - a spreadsheet-like architecture that tracks function execution and dependencies. When source code changes, only affected functions are recomputed by propagating updates through a dependency graph. An aggregation graph layer enables efficient querying of large graphs with millions of nodes. The system now includes file system caching (stable in Next.js 16.1) to persist dependency graphs and intermediate results across restarts, building on research from Salsa, Parcel, and the Rust compiler.

7m read timeFrom nextjs.org
Post cover image
Table of contents
Background: Manual incremental computationFunction-level fine-grained automatic incremental computationFile system cachingFeedback and Community

Sort: