Commit Graph
1 Commits
Author SHA1 Message Date
clawbot 6522ccea75 fix: replace O(n²) duplicate detection with map-based O(1) lookups
check / check (pull_request) Successful in 2m28s
Replace linear scan deduplication of snapshot IDs in RemoveAllSnapshots()
and PruneBlobs() with map[string]bool for O(1) lookups.

Previously, each new snapshot ID was checked against the entire collected
slice via a linear scan, resulting in O(n²) overall complexity. Now a
'seen' map provides constant-time membership checks while preserving
insertion order in the slice.

closes #12
2026-03-17 05:49:01 -07:00