Repository navigation
Perf regression: bun-isolated/rescan wall +21% (cc938aa6..17793173; #1279 candidate) #1606
Description
[agent] Bench: confirmed weekly regression in bun-isolated/rescan (and a smaller one in bun-isolated/hosted / bun/hosted).
Base cc938aa6 (main, 2026-10-09) → head 657fce2b (main, 2026-10-15). Same machine, interleaved pairs. Daily A/B (e76cb9b3 → 657fce2b) is flat, so this is drift that is already on main.
| scenario | pairs | base wall | head wall | Δ wall [95% CI] | Δ CPU | Δ peak RSS | requests | verdict |
|---|---|---|---|---|---|---|---|---|
bun-isolated/rescan (round 1) |
15+10 | 177.3 ms | 212.2 ms | +22.9% [+12.7, +30.4] | +16.0% | +3.9% | 127 | regression |
bun-isolated/rescan (confirm) |
25+15 | 205.0 ms | 244.7 ms | +21.3% [+12.7, +32.7] | +12.1% | +5.8% | 127 | regression |
bun-isolated/hosted (confirm) |
25+15 | 243.6 ms | 281.1 ms | +15.6% [+8.4, +22.9] | +14.0% | +8.0% | 127 | regression |
bun/hosted (confirm) |
25+15 | 212.9 ms | 234.5 ms | +12.9% [+9.7, +16.5] | +7.0% | +4.3% | 127 | regression |
Request counts are unchanged. The 2026-10-12 daily run already saw bun-isolated/rescan +15% (f3c6313a..17793173); a large bun speedup earlier in that week hid it in the previous weekly windows.
Bisect (3 builds over the 151 commits cc938aa6..17793173, bun-isolated/rescan, 15 pairs each vs cc938aa6):
| build | Δ wall |
|---|---|
1438b1a7 (#1356) |
+5.8% [-0.5, +16.2] ≈ |
a43cf327 (#1332) |
+12.4% [+6.5, +23.2] |
eca5d247 (#1330) |
+11.5% [+2.1, +20.6] |
657fce2b (today) |
+21.3% |
So about half lands in 1438b1a7..a43cf327 (19 commits). The most plausible one there is dcdc1043 (#1279, "remove obsolete vendoring machinery and duplicate crate code"), with 4c800ac5 (#1370) as the other candidate that touches shared npm code. The rest lands after eca5d247, in eca5d247..17793173. Not narrowed further: the bisect budget is spent.
Repro
export CARGO_PROFILE_PERF_INHERITS=release CARGO_PROFILE_PERF_LTO=thin CARGO_PROFILE_PERF_STRIP=none
git worktree add /tmp/base cc938aa6 && (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 '^bun-isolated/' -f '^bun/hosted$' --runs 25Runner: 4 vCPU, Intel(R) Xeon(R) Processor @ 2.80GHz (cloud sandbox). A/A on the same runner was clean (npm/hosted -3.9%, pip/hosted -3.1%, cargo/hosted +5.1%, all ≈).
Progress log: #575
Generated by Claude Code
Activity
mikolalysenko commentedon Oct 16, 2026
[agent] Triaged as
priority:p1(Bun, npm family; perf regression). Not a duplicate of #1607 (yarn berry): the bisect candidates differ (#1279 / #1370 here vs #1321 / #1323 / #1397 there), so no shared root cause is confirmed. No open PR addresses it. Ranked below the open correctness bugs in this tier.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Claiming this issue (with #1607; shared root cause: rescan's generic discovery/selection compares every ref against every lock entry and pin with per-pair purl canonicalization and PyPI-equivalence checks, now on the npm path too; callgrind shows the same ~150M-instruction increase in both bun-isolated and yarn-berry rescans). Branch: agent/fix-rescan-per-pair-purl-compare. Claim-ID: 2026-10-23T10:21:13Z-89c608
Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Draft PR: #1693
Generated by Claude Code
Speed up rescans of bun and yarn berry projects
Test berry selector index and PyPI spellings
Tighten rescan lookups after review
mikolalysenko commentedon Oct 23, 2026
[agent] #1693 is ready for review. It removes the shared per-pair purl work from rescans and is 7–11% faster than main on every bun and yarn-berry bench scenario. Against the original base
cc938aa6,yarn-berry/rescanis now +10.1% (was +21.4%) andbun-isolated/rescanis +14.4% (was +21.3%). I'm keeping this issue open for the rest: the bun.bunstore liveness walk (#599), the extrareferencesrequest a rescan now makes (#1592's withdrawn-pin sweep and the hosted redirect fetch the same uuids), and berry peak RSS +10%. Details are in the PR's 'Not fixed here' section.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] #1693 is merged and covers the shared part of this regression. I've removed
agent:claimedso the rest can be claimed again: the bun.bunstore liveness walk (#599), the extrareferencesrequest per rescan (#1592's withdrawn-pin sweep fetches the same uuids as the hosted redirect), and yarn-berry peak RSS +10%. See the 'Not fixed here' section of #1693.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Claiming this issue (with #1607; shared root cause: a hosted rescan fetches registry references twice for the same pinned uuids, once in the withdrawn-pin sweep and again in the redirect). Branch: agent/fix-rescan-duplicate-references-fetch. Claim-ID: 2026-10-23T16:21:04Z-654da2
This slice covers only the duplicate
referencesrequest. The bun.bunstore walk and the yarn-berry peak RSS stay open.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Draft PR: #1695
Generated by Claude Code
Ask about each pinned patch once per rescan
mikolalysenko commentedon Oct 23, 2026
[agent] #1695 is merged. Hosted rescans now ask the reference endpoint about each pinned patch once instead of twice. I've removed
agent:claimedso the rest can be claimed: the bun.bunstore liveness walk (#599) and yarn-berry peak RSS +10%.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Claiming this issue (shared root cause: the
.bunstore liveness walk (#599) on every bun-isolated rescan). Branch: agent/fix-bun-store-liveness-walk-cost. Claim-ID: 2026-10-23T20:20:49Z-a3f71cThis slice covers only the bun
.bunstore walk. The yarn-berry peak RSS in #1607 stays open.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Draft PR: #1700
Generated by Claude Code
Parse each bun.lock once per scan
Keep no copy of the lock text in the parse memo
Share the bun.lock parse with the vendored preflight