Repository navigation
Conversation
ef8164a to
b3795ac
Compare
Merging this PR will degrade performance by 14.55%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ |
Simulation | discover_workspace_from_all_members_with_excludes |
140.2 ms | 164 ms | -14.55% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing zb/bughuntperf/264-workspace-member-path-lookup (38155c0) with main (05e1cc1)
Footnotes
-
35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
b3795ac to
38155c0
Compare
Repeated discovery of an already-cached workspace member scans the workspace’s package map to recover the project name. Store the optional project name alongside each path-keyed cache entry and reuse it in project and virtual-project discovery. This removes the repeated member scan while keeping virtual workspace roots distinct from projects, selecting the first package in workspace order when member roots overlap, and respecting intermediate
pyproject.tomlboundaries.Hyperfine 2.0.0 measurements of 75a00c556 → b3795ac8b used release builds with Rust 1.99.0 and CPython 3.12.13 on an AMD EPYC-Genoa Linux VM, pinned to four CPUs. The command was
uv lock --directory FIXTURE --python PYTHON --no-index, with--offline --no-config --color never --cache-dir CACHE. Output went to/dev/null.The synthetic root depends on every local workspace member through workspace sources. The root project sorts after the members. Each invocation performs a fresh lock, including workspace discovery, repeated member lookup, resolution, and lock serialization. Hyperfine's
--prepareremoves the previous lock outside measured time and RSS. OS pages and interpreter-query caches were warm. These local fixtures use no external index or source backend.Values are means, parent → head. Changes are
(head / parent - 1)with 95% confidence intervals; negative values indicate a reduction.Each workload used ten comparison blocks with alternating revision order, one warmup followed by three measured runs per revision in each block (30 measurements per revision). The pointwise 95% percentile-bootstrap intervals use 20,000 resamples of paired block means and retain all samples. They estimate within-run uncertainty, not variation across machines, independent builds, or separate benchmark campaigns.
The 1,024-member case uses 8.60% less wall time [-9.92%, -7.47%], falling from 353.9 ms to 323.5 ms. At 2,048 members, time falls from 764.7 ms to 636.2 ms: -16.80% [-17.65%, -15.99%]. The three smaller runtime intervals include zero. All five RSS intervals include zero. These fresh-lock measurements show runtime improvements in the two largest workspaces, without an established peak-memory change. RSS is Hyperfine's Linux
wait4peak, not an allocation count or summed simultaneous process-tree memory.