perf: keep recursive warm-slot disk scans off foreground path

Merged
TE
2mo ago
+75-14

Summary

Normal warm-slot warm / task-run execution recursively walked the entire cache tree before and after native work solely to populate disk-growth telemetry. As DerivedData grows, that observation cost can become foreground latency.

This change:

  • makes recursive cache-byte measurement explicit via --measure-disk;
  • leaves ordinary warm/task execution measurement-free by default;
  • keeps the physical benchmark passing --measure-disk, so cache-growth evidence remains available where it is deliberately measured;
  • adds regression coverage for default-off production behavior and benchmark opt-in.

No source/toolchain/generation/lease/recovery semantics change.

Related: #13091, teamleaderleo/glaeda#1095.


Summary by cubic

Moves recursive cache-size measurement off the foreground warm/task-run path so large DerivedData trees can't make routine telemetry a latency tax.

warm and task-run no longer walk the cache tree before/after native work by default. A new --measure-disk flag opts back into byte-growth measurement, and the physical benchmark passes it so cache-growth evidence stays available. Receipts omit disk fields unless measured; regression tests cover both default-off and opt-in behavior. Related: #13091.