Uh oh!
There was an error while loading. Please reload this page.
REGRESSION - IMPROVEMENT - Reuse one worktree per commit instead of per (case, ref) - #369
Conversation
…er (case, ref) Every (case, ref) pair created and tore down its own git worktree, so N cases against the same commit paid for Pkg.instantiate()/precompile N times over. Cases now run grouped by ref, sharing one worktree per unique commit; worktree creation is skipped entirely when every case at that commit is already cached. Benchmarked on 3 lightweight cases against develop: 2:02 -> 1:28 wall time with a warm package depot. On a cold depot or heavier cases the win is much larger — a prior 11-case run against develop didn't finish Pkg.instantiate() for even half the cases in 52 minutes; the same run with this change completes all 11 cases (both develop and local) in under 41 minutes.
jhalpern30
commented
Aug 13, 2026
Figured Mr. Regression himself @d-burg would be best to review this, but wanted to flag this for @logan-nc@matt-pharr and @priyanshlunia - I found this substantially speeds up multi-case runs which were taking forever by running all cases on each branch then switching to the other branch (instead of going case by case, switching branches each time). Should be helpful during the remainder of the cleanup hackathon |
logan-nc
left a comment
There was a problem hiding this comment.
Manual read checked out.
My AI caught a few minor robustness improvements that will land soon (checking regression run now), at which point we can merge. I'll add a follow-up PR that adds threads for more performance wins.
…guard stale outputs Worktree-creation failure at one commit is now stored as a failed run for each uncached case and the remaining refs proceed (a bad commit no longer aborts a --ref-range scan). Remove any pre-existing gpec.h5 before running so a stale output cannot mask a failed run in a shared worktree or in the repo example dir. Document the worktree_path ownership contract and the single-invocation worktree sharing; note in CLAUDE.md that the pre-commit JuliaFormatter version is not pinned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sion-harness-worktree-reuse # Conflicts: # regression-harness/regress.jl # regression-harness/src/runner.jl
Uh oh!
There was an error while loading. Please reload this page.
Summary
regression-harness/) created and tore down a brand-new git worktree for every (case, ref) pair, so an N-case run against one commit paid forPkg.instantiate()+ a full precompile ofGeneralizedPerturbedEquilibriumN separate times.run_cases_at_refinrunner.jl), sharing a single worktree across every case that needs the same commit. Worktree creation is skipped entirely when every case at that commit is already cached.run_commit/run_computed_at_commit/run_at_commitgained an optionalworktree_pathkwarg so they can reuse a shared worktree without changing behavior for any other caller.Test plan
kind="computed"cases (ggj_reference,ggj_ray_q500i,efit_fixedbdy_separatrix) againstdevelopwith a warm package depot: 2:02 → 1:28 wall time, 3 worktrees → 1.developandlocalonrefactor/vacuum-response-struct: completed in 40m52s end-to-end. The same run with the old code did not finishPkg.instantiate()for even 9 of 11develop-side cases in 52 minutes before it had to be killed.developand the working tree in that run.🤖 Generated with Claude Code