Skip to content

Fix performance regression in unzip of local wheels#19636

Closed
zanieb wants to merge 1 commit into
mainfrom
zb/sync-clone
Closed

Fix performance regression in unzip of local wheels#19636
zanieb wants to merge 1 commit into
mainfrom
zb/sync-clone

Conversation

@zanieb

@zanieb zanieb commented Jun 1, 2026

Copy link
Copy Markdown
Member

Closes #19635

I reproduced the issue over increasing target sizes

File count Directory count 0.11.14 0.11.15 Regression
1,000 250 0.045s 0.048s 1.1x
3,000 750 0.117s 0.147s 1.3x
10,000 2,500 0.379s 0.844s 2.2x
30,000 7,500 1.16s 11.42s 9.8x
100,000 25,000 3.59s 213.5s 59.5x

The issue appears to not be build, e.g., uv build --wheel was no affected, but unpacking the wheel into the cache.

The root cause is that cloning the zip reader is really expensive in rs-async-zip, unlike the sync zip crate.

Here are the results for 100k files, including after this fix.

Binary Prepare Install Total User CPU Sys CPU
0.11.14 3.71s 28.59s 38.41s 3.17s 42.04s
0.11.15 3m34s 30.84s 251.03s 1755.53s 1367.60s
branch 3.07s 27.03s 35.09s 3.57s 39.95s

@zanieb

zanieb commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

The proper solution, imo, is astral-sh/rs-async-zip#41

@zanieb zanieb closed this Jun 1, 2026
zanieb pushed a commit that referenced this pull request Jun 1, 2026
## Summary

Closes #19636. Fixes #19635.

## Test Plan

NFC.

Signed-off-by: William Woodruff <william@yossarian.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Significant performance degradation building packages

1 participant