Turbopack: Add task GC infrastructure (Phase 1)
Implement the core garbage collection framework for turbopack tasks. Tasks become GC-eligible when they have no incoming edges (no dependents, no activeness state, not executing). The GC processor disconnects eligible tasks from the aggregation tree, removes outgoing dependency edges, and cleans up storage. Key components: - TaskStorage::is_gc_eligible() checks for zero incoming edges - GcOperation processes batched GC candidates with aggregation tree cleanup - GC triggers in decrease_active_count and cleanup_old_edges - Storage::remove_task/mark_deleted for memory and DB cleanup tracking - ConcurrentQueue-based deferred GC queue to avoid cascading latency - IdFactoryWithReuse unit test coverage
Showing
Please
register
or
sign in
to comment