Skip to content

Reduce IO cost of session cache GC size accounting #61

@zzj3720

Description

@zzj3720

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions