Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv python install consumes a lot of memory #10060

Closed
jooon opened this issue Dec 20, 2024 · 4 comments · Fixed by #10063
Closed

uv python install consumes a lot of memory #10060

jooon opened this issue Dec 20, 2024 · 4 comments · Fixed by #10063
Assignees
Labels
bug Something isn't working

Comments

@jooon
Copy link
Contributor

jooon commented Dec 20, 2024

While investigating #10057 and rerunning the uv python install command to get a shorter test case I noticed uv became slower and slower the more I used it. It seems to read and rewrite a _sysconfigdata__linux_x86_64-linux-gnu.py file which keeps getting bigger and bigger for every run.

$ uv --version
uv 0.5.11
$ uv python uninstall --all
Searching for Python installations
No Python installations found
$ time (for i in {1..25}; do uv python install 3.12.8; done)
Installed Python 3.12.8 in 1.06s
 + cpython-3.12.8-linux-x86_64-gnu

real	0m27.687s
user	0m17.309s
sys	0m8.580s
$ cd /home/jon/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/
$ du -hs _sysconfigdata__linux_x86_64-linux-gnu.py
2.3G	_sysconfigdata__linux_x86_64-linux-gnu.py
@jooon
Copy link
Contributor Author

jooon commented Dec 20, 2024

Tested some old versions. Looks like it was introduced in uv 0.5.9.

@jooon
Copy link
Contributor Author

jooon commented Dec 20, 2024

That's a lot of backslashes :)

I guess the bug is somewhere here, but I can't see it.

fn parse_string(cursor: &mut Cursor, quote: char) -> Result<String, Error> {

@konstin konstin added the bug Something isn't working label Dec 20, 2024
@zanieb
Copy link
Member

zanieb commented Dec 20, 2024

Thanks for the report!

@charliermarsh
Copy link
Member

Noooooooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants