You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gix-ref: profiling helper for wide-refs lookup loops
Adds an `#[ignore]`'d test `loose_stat_overhead_profile` that simulates
a fetch's `update_refs` loop against the existing 150k-packed-ref
fixture, reporting per-strategy timings:
- `store.try_find(name)` — current path, stats the loose-ref file before
falling through to packed.
- A pre-built `HashSet` of loose names + `packed.try_find(name)` direct,
which is the lookup shape a hypothetical `file::Store`-level loose-name
cache would produce.
On warm cache with this PR's packed buffer index applied, ~80% of the
remaining lookup wall time is the per-call loose `stat` (most of which
returns ENOENT against the dentry cache). The absolute reclaimable time
is workload-dependent — typically ~0.3 s warm-cache, more on cold-cache
or network filesystems — so the helper lets future work decide whether
a loose-refs follow-up is worth its complexity, given local numbers.
Run with:
cargo test -p gix-ref --release --features sha1 --test refs \\
-- --ignored --nocapture loose_stat_overhead_profile
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments