Follow-up from PR #60 review.
getPathSizeBytes currently recursively lstat/readdir walks every file under cache candidates so dry-run can report exact bytes. That is useful for observability, but large DerivedData or node_modules trees can create avoidable IO every cleanup interval, especially while dry-run remains enabled.
Explore lower-cost approaches:
- use a platform
du -sk helper where available, or another bounded approximation;
- cap scan budget and continue in later intervals;
- only compute exact size when disk waterline is close/under threshold;
- preserve structured logs with a clear exact/estimated byte indicator.
Related PR: #60
Follow-up from PR #60 review.
getPathSizeBytescurrently recursively lstat/readdir walks every file under cache candidates so dry-run can report exact bytes. That is useful for observability, but largeDerivedDataornode_modulestrees can create avoidable IO every cleanup interval, especially while dry-run remains enabled.Explore lower-cost approaches:
du -skhelper where available, or another bounded approximation;Related PR: #60