Repository navigation
Perf regression: hatch/hosted wall +21% (9c43dfc9..17793173) #1471
Copy link
Copy link
Closed
Labels
agent:claimedagent:triagedbenchsocket-patch scan benchmark suitesocket-patch scan benchmark suiteperf-regressionConfirmed performance regressionConfirmed performance regressionpm:hatchHatchHatchpriority:p1
Description
[agent] Bench: hatch/hosted and hatch/rescan have regressed by 10% or more in three consecutive daily runs (10-09, 10-12, 10-13). Today's run confirmed it on the same machine. This is slow drift across about 220 commits, not one step.
| scenario | base wall | head wall | Δ wall [95% CI] | Δ CPU | requests |
|---|---|---|---|---|---|
hatch/hosted (8+8 pairs) |
64.3 ms | 71.7 ms | +13.9% [+6.7, +27.4] | +14.9% | 53 |
hatch/hosted (confirm, 20+10) |
63.5 ms | 75.0 ms | +21.2% [+14.2, +26.0] | +16.6% | 53 |
hatch/rescan (8+8 pairs) |
57.4 ms | 67.3 ms | +18.6% [+4.1, +29.3] | +13.0% | 53 |
hatch/rescan (confirm, 20+10) |
58.7 ms | 66.9 ms | +12.6% [+2.9, +20.6] | +10.6% | 53 |
- Base:
9c43dfc9(main on 2026-10-06). Head:15c2c839(main on 2026-10-13). The daily A/B (17793173→15c2c839) is flat (+4.7% and -5.1%, both ≈), so nothing landed in the last day. - Range:
9c43dfc9..17793173. One bisect point,f3c6313a, measured hatch/hosted at +11.0% [-4.8, +23.8] over the base. That puts about half the cost in9c43dfc9..f3c6313a, where the candidates are Fix Hatch environments being invisible to stale-install checks and VEX (#335) #700 (Hatch envs in stale-install checks and VEX), Fix vendored uv/Hatch re-vendor to a newer patch (#742, #650) #943 (uv/Hatch re-vendor), Pick pure pypi lock wheels through one shared portability rule (#1150) #1151 and Fix PyPI package specs ignoring PEP 503 spellings (#910) #911. The other half is inf3c6313a..17793173, where the candidates are Fix Hatch-derived pylock.toml lock-only rewrite (#479) #1336 (Hatch-derived pylock rewrite) and the shared hosted-engine changes. No single culprit was found within the 3-build budget. - Hot spot (callgrind, head, hatch/hosted):
utils::hatch::rewrite→utils::hatch::plantakes 40% of Ir insiderewriter_groups.utils::purl_key::PurlKey::new/canonical_base_purltakes 13%, andpython_crawler::list_dist_info_packages_synctakes 12%, mostly incanonicalize_pypi_name. The plan step re-canonicalizes purls per environment pin, which looks like the per-pin cost that grew.
Repro:
export CARGO_PROFILE_PERF_INHERITS=release CARGO_PROFILE_PERF_LTO=thin CARGO_PROFILE_PERF_STRIP=none
git worktree add /tmp/base 9c43dfc9 && (cd /tmp/base && CARGO_TARGET_DIR=/tmp/tb cargo build --locked --profile perf -p socket-patch-cli)
cargo build --locked --profile perf -p socket-patch-cli -p socket-patch-bench
target/perf/socket-patch-bench compare --base /tmp/tb/perf/socket-patch --head target/perf/socket-patch -f '^hatch/' --runs 20Runner: 4 vCPU, Intel(R) Xeon(R) Processor @ 2.10GHz (cloud sandbox), run 2026-10-13.
Generated by Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
agent:claimedagent:triagedbenchsocket-patch scan benchmark suitesocket-patch scan benchmark suiteperf-regressionConfirmed performance regressionConfirmed performance regressionpm:hatchHatchHatchpriority:p1
Activity
mikolalysenko commentedon Oct 13, 2026
[agent] Triaged as priority:p1 (Hatch, PyPI family). Not a duplicate; the hot spot is
utils::hatch::planre-canonicalizing purls per environment pin.Generated by Claude Code
mikolalysenko commentedon Oct 13, 2026
[agent] Claiming this issue (shared root cause: hosted Hatch rewrite re-parses and re-renders pyproject.toml/hatch.toml and re-canonicalizes every pin once per patched dependency). Branch: agent/fix-hatch-batch-rewrite. Claim-ID: 2026-10-13T08:20:47Z-370887
Generated by Claude Code
mikolalysenko commentedon Oct 13, 2026
[agent] Draft PR: #1474
Generated by Claude Code
Wire all hosted Hatch deps in one pass