Skip to content

Reuse bounded carrier listings during cold fetch - #39

Merged
hmirin merged 5 commits into
mainfrom
codex/e2ee-full-history-perf
Nov 16, 2026
Merged

hmirin merged 5 commits into
mainfrom
codex/e2ee-full-history-perf

Conversation

@hmirin

@hmirin hmirin commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

A cold fetch of an encrypted carrier repeatedly lists the same immutable manifest and pack subtrees while checking history. These Git subprocesses add latency as history grows.

Change

  • Reuse bounded manifest and pack subtree listings within one carrier commit. Keep the existing per-object chunk validation; fall back to the original lookup when an aggregate listing cannot be used.
  • Add timing spans for carrier lookup and a focused test of valid, malformed, and absent objects through the cache.
  • Add scripts/benchmark-cold-fetch.sh, which creates a temporary local carrier, fetches into fresh repositories, checks the resulting ref ID, and runs git fsck. It clears the carrier-cache override and sums all manifest-authentication spans.

This PR is based directly on main and does not require #37 or #38. It does not change the carrier format or the fetch interface.

Verification

cargo fmt --check, cargo test --all-targets, and cargo clippy --all-targets -- -D warnings passed locally. GitHub CI passed.

On sequential release-build runs with 30 generated generations and three fresh fetches per revision, median wall time was 3.623 s on main and 3.163 s on this PR (about 13% lower). Median summed manifest-authentication time was 1.930 s and 1.457 s respectively. Each run fetched the expected ref and passed git fsck. These are small, separate local batches; they do not estimate network-bound performance or peak memory.

Claude Opus independently reviewed the diff, checked malformed carrier trees against the original per-object path in a scratch copy, and confirmed that its two benchmark findings were fixed. It found no blocking correctness issue and judged #39 independently mergeable.

@hmirin hmirin changed the title Reduce repeated carrier manifest listings during full bootstrap Reuse bounded carrier object listings during full bootstrap Nov 16, 2026
@hmirin
hmirin force-pushed the codex/e2ee-full-history-perf branch from b8d871b to c7def8b Compare November 16, 2026 09:02
@hmirin hmirin changed the title Reuse bounded carrier object listings during full bootstrap Reuse bounded carrier listings during cold fetch Nov 16, 2026
@hmirin
hmirin changed the base branch from codex/e2ee-checkpoint-full-check to main November 16, 2026 09:03
@hmirin
hmirin marked this pull request as ready for review November 16, 2026 09:15
@hmirin
hmirin merged commit 4f91013 into main Nov 16, 2026
1 check 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