Skip to content

perf(pruning): remove unused code and add day-level file caching#161

Merged
xe-nvdk merged 1 commit intomainfrom
perf/pruning-sanitization-26.02.1
Jan 25, 2026
Merged

perf(pruning): remove unused code and add day-level file caching#161
xe-nvdk merged 1 commit intomainfrom
perf/pruning-sanitization-26.02.1

Conversation

@xe-nvdk
Copy link
Copy Markdown
Member

@xe-nvdk xe-nvdk commented Jan 25, 2026

Summary

  • Remove unused FilesPruned/FilesScanned stats counters (defined but never incremented)
  • Add caching for day-level file existence checks (reduces S3/Azure API calls from O(N) to O(1) for repeated queries)
  • Add CleanupPartitionCache() public method for cache maintenance (matches existing CleanupGlobCache())
  • Remove redundant TrimSuffix operation (duplicate call)
  • Remove unused min() helper function (Go 1.21+ has builtin)

Test plan

  • All pruning unit tests pass (go test ./internal/pruning/... -v)
  • Build passes (go build ./...)
  • Go vet passes (go vet ./internal/pruning/...)

- Remove unused FilesPruned/FilesScanned stats counters (never incremented)
- Add caching for day-level file existence checks (reduces API calls)
- Add CleanupPartitionCache() public method for cache maintenance
- Remove redundant TrimSuffix operation
- Remove unused min() helper (Go 1.21+ has builtin)
@xe-nvdk xe-nvdk merged commit 21eb220 into main Jan 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant