compact: cache each archive's referenced objects to speed up analysis#9896
Merged
ThomasWaldmann merged 1 commit intoJul 11, 2026
Merged
Conversation
Member
Author
|
Did a quick test:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9896 +/- ##
==========================================
- Coverage 85.32% 85.18% -0.14%
==========================================
Files 93 93
Lines 15671 15793 +122
Branches 2387 2400 +13
==========================================
+ Hits 13372 13454 +82
- Misses 1598 1633 +35
- Partials 701 706 +5 ☔ View full report in Codecov by Harness. |
analyze_archives() scans every archive's items on each run just to collect the object ids it references. Cache that per archive in the repo as cache/referenced-by-archive.<id>, so an unchanged archive is not scanned again next time; caches of archives that no longer exist are dropped. The cache stores the referenced object ids (id -> plaintext size) plus the archive's source file count and content size, both counted per occurrence, so the reported statistics are identical to a full scan. Integrity is protected by a sha256 appended to the serialized blob. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5bfa787 to
398ff20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
analyze_archives() scans every archive's items on each run just to collect the object ids it references. Cache that per archive in the repo as cache/referenced-by-archive., so an unchanged archive is not scanned again next time; caches of archives that no longer exist are dropped.
The cache stores the referenced object ids (id -> plaintext size) plus the archive's source file count and content size, both counted per occurrence, so the reported statistics are identical to a full scan. Integrity is protected by a sha256 appended to the serialized blob.