next.js
1caa1511 - [Turbopack] make filesystem tasks session dependent instead of invalidating on startup (#70945)

Commit
1 year ago
[Turbopack] make filesystem tasks session dependent instead of invalidating on startup (#70945) ### What? Before we did invalidate all filesystem tasks when an incremental build starts. But that has a performance linear to the number of filesystem tasks. We like to avoid that. This PR refactors that and introduces a new dirty state, which means "task is dirty in general, but considered as clean for a certain session". All filesystem tasks are marked this way. When an incremental build starts we only increment the session id, which makes all filesystem tasks considered as dirty. No looping over all filesystem tasks to make them dirty anymore. ### Why? Most of the cost before was spend in updating the task aggregation when task where marked dirty. This requires to restore a lot of aggregated tasks. This cost has moved to the point when the filesystem task is recomputed. So it's per page. This has benefits for next dev which doesn't build all pages.
Author
Parents
Loading