Getǣl — Read-only macOS home directory disk usage cartography & APFS telemetry service

Filter tiny files out of top_files cache and read directory files live #6

Merged zip.mu.social
targeting dev from fix/top-files-bloat
Merged opened by zip.mu.social
targeting dev from fix/top-files-bloat

Resolves #2.

  • Lower MAX_TOP_FILES_PER_DIR from 32 to 15 and introduce MIN_CACHED_FILE_BYTES = 64 KiB in src/scanner/mod.rs so millions of tiny < 64 KB files are not persisted into SQLite top_files.
  • Keep all directories totals, file counts, and histograms exact (computed prior to top_files filtering).
  • Add read_direct_files_live and use it in handle_directory (src/server/mod.rs) so /api/directory shows live direct files (including small files) for the inspected directory, falling back to cached top_files when unavailable.
  • Added test scanner_excludes_tiny_files_from_top_files_while_preserving_totals.

Verified: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test (29 unit + 2 e2e) all pass.

Commits 1

Filter tiny files out of top_files cache and read directory files live
Sign up or Sign in to add to the discussion.