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
{{ message }}
Repository navigation
Slow scan: vlt hosted 2.6x median ms/pkg (vlt::partition_instances / split_dep_id per patch) #1570
[agent] Bench: vlt scans have been flagged slow by the daily socket-patch scan benchmark in 3 consecutive runs (2026-10-13, 2026-10-14, 2026-10-15). Both vlt scenarios are also over the 500 ms absolute limit.
run
main
vlt/hosted median
vlt ms/pkg
× median ms/pkg (hosted, all PMs)
2026-10-13
15c2c839
—
—
>2x (slow list)
2026-10-14
313d5324
743.2 ms
0.495
2.02x
2026-10-15
e76cb9b3
514.9 ms (rescan 550.7 ms)
0.343
2.56x
Absolute timings come from different cloud runners, so read them as trend context only. Today's same-machine A/B shows no new day-over-day regression (vlt/hosted −4.4% [−6.9, +4.8]). Against 6fcc51b4 (7 days ago), vlt is 50% faster (1.00 s → 503 ms), but it is still the slowest npm-family scan per package by a wide margin. bun/pnpm are at 0.06 ms/pkg; vlt is at 0.34 ms/pkg.
Hot spot (callgrind, vlt/hosted, 1500 packages, 30 patched, head e76cb9b3)
patch::redirect::vlt::rewrite_vlt_lock accounts for 43% of instructions. Inside it:
The dep-id parsing (split_dep_id and its semver/identity checks) appears to run over every lock node once per patch or pin, rather than once per scan. Parsing the node keys once and indexing them by registry identity before the per-patch loop should remove most of this cost.
strace -c: 82% futex wait time (the worker pool idle while the main thread does the lock work), 20k statx, 9.8k openat.
Repro
export CARGO_PROFILE_PERF_INHERITS=release CARGO_PROFILE_PERF_LTO=thin CARGO_PROFILE_PERF_STRIP=none
cargo build --locked --profile perf -p socket-patch-cli -p socket-patch-bench
target/perf/socket-patch-bench run --bin target/perf/socket-patch -f '^vlt/' -v
target/perf/socket-patch-bench serve vlt/hosted # then run the printed command under valgrind --tool=callgrind
[agent] Triaged: priority:p1 (vlt, npm family; perf enhancement). The hot path cited is plausible on main e76cb9b: patch/redirect/vlt.rs calls split_dep_id per node inside per-patch helpers (lines 101, 237, 273, 379, 459). Not a duplicate. No open PR addresses it. It ranks below the open correctness p1s.
[agent] Claiming this issue (shared root cause: the vlt hosted rewrite and preflight re-parse every lock node's dep id with split_dep_id once per patch instead of once per scan). Branch: agent/fix-vlt-dep-id-reparse. Claim-ID: 2026-10-23T08:21:03Z-51f75d
Activity
mikolalysenko commentedon Oct 15, 2026
[agent] Triaged: priority:p1 (vlt, npm family; perf enhancement). The hot path cited is plausible on main
e76cb9b:patch/redirect/vlt.rscallssplit_dep_idper node inside per-patch helpers (lines 101, 237, 273, 379, 459). Not a duplicate. No open PR addresses it. It ranks below the open correctness p1s.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Claiming this issue (shared root cause: the vlt hosted rewrite and preflight re-parse every lock node's dep id with split_dep_id once per patch instead of once per scan). Branch: agent/fix-vlt-dep-id-reparse. Claim-ID: 2026-10-23T08:21:03Z-51f75d
Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Fix PR (draft): #1691
Generated by Claude Code