Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large
site-packagesindexes read several optional sidecars for each installed wheel in sequence. Read eligible.dist-infoentries in bounded batches on the configured installer thread pool once an index contains at least 1,024 wheels. Smaller indexes and explicitly single-threaded runs remain serial so metadata-only commands do not pay unnecessary pool-startup cost. A staged sidecar reader lets conversion, diagnostics, first-error handling, legacy entries, and index insertion remain in sorted path order.METADATAandWHEELare still read lazily.Hyperfine 2.0.0 measurements of 45aab588c → 7f4243496 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 pip list --format json --python VENV_PYTHON, with--offline --no-config --color never --cache-dir CACHE.UV_CONCURRENT_INSTALLS=4sets the installer pool width, except for the one-worker control, which usesUV_CONCURRENT_INSTALLS=1. Output went to/dev/null.The synthetic virtual environments contain the indicated number of wheel metadata directories. Present-sidecar fixtures include
uv_cache.json,uv_build.json, and archive-styledirect_url.json; missing fixtures omit all three, and the mixed fixture alternates present and missing records. The 1,023/1,024 cases bracket the parallel-reader threshold. OS page and interpreter-query caches were warm. Each fresh process constructs the installed-package index and renders JSON, including installer-pool startup when the parallel path is enabled.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 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 five parallel-reader cases take 19.9–57.7% less time and use about 0.33–1.69 MiB more peak RSS (1.4–5.2%). The one-worker control takes 2.6% more time, with a 95% interval from 0.05% to 6.00%; all four below-threshold runtime intervals include zero. The 100-package missing-sidecar control uses about 0.15 MiB less peak RSS, while the other control RSS intervals include zero. These warm-filesystem results show large runtime reductions on the parallel path, a peak-memory increase, and a smaller regression in the one-worker control. RSS is Hyperfine's Linux
wait4peak, not an allocation count or summed simultaneous process-tree memory.Earlier command and component measurements
The
installed_package_sidecarswall-time benchmark compares b1dd047e with this pull's 7f424349. Entries are Criterion medians in milliseconds, with 95% confidence intervals.Fresh-process
uv pip list --format jsonmeasurements include process and thread-pool startup. The same revisions were measured on the real 93-package Jupyter environment fromtest/requirements/compiled/jupyter.txt, and on valid 1,024-package fixtures at the parallelism boundary.UV_CONCURRENT_INSTALLS=1Both comparisons used Linux 5.15.0-1110-azure, x86-64/ext4, 16 logical AMD EPYC 9V74 CPUs, Rust 1.98.1
profilingbuilds, locked dependencies, CPython 3.12.13, and warm filesystem state. Criterion used 10 samples, a one-second warmup, and a two-second requested measurement window. Fresh-process rows use 12 balanced runs per revision/configuration; their intervals use the third and tenth sorted observations, giving 96.14% coverage for the median. Reproduce the library comparison withcargo bench --locked --profile profiling -p uv-bench --bench fs_metadata -- installed_package_sidecars --sample-size 10 --warm-up-time 1 --measurement-time 2.The merge case is a 68–75% reduction for the 2,000-package cases and a fresh-process improvement at the 1,024-package cutoff. The serial 500-package cases are 2.7–3.6% slower on this host; the small Jupyter differences are not evidence of a meaningful change. The cutoff keeps the large-index benefit without imposing pool startup on ordinary small environments.