-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve UX and Performance of Install step #12712
Comments
This scenario is artifically constructed to best profile the installer code by removing the need to download, build sdists, or resolve:
I ran with and without I profiled with and without There are some clear hotspots here, I will take a look when I have time if there are some easy ways to reduce those hotspots if no one else does. |
The |
I see no issues with the UI proposal, but I'd want parallel installs to be a separate feature. I can imagine pathological cases where things could break when installing in parallel, and while the experience of |
Great, I'll reprofile with this PR. I personally wasn't imagining any of these ideas would land for 24.1.
Agree, I'll make a seperate issue for that. Honestly, the others I feel like I could make PRs that safely improve pip, I'm unsure about parralel installs, I think it would at a minimum carefully need to look at what current multiple installs tests there are and potentially expanding them to have a good matrix of different possibilities. |
Btw, I was looking at this recently because I noticed pip does tell you it's installing packages. The specific scenario I was seeing was the following:
On step two this produces the following behavior:
The real world situaiton this happens is installing large machine learning packages, particularly because you install a bunch of packages from the pytorch index, and then install a bunch of packages from pypi. I think there are a couple of possible solutions:
I will take a look at PRs when I have a chance. |
Caching the result of pip/src/pip/_internal/resolution/resolvelib/factory.py Lines 608 to 612 in 86b8b23
I'll submit a PR when I get the chance. Footnotes
|
What's the problem this feature will solve?
At the moment when the final install step starts pip gives no output what it is doing, in some real world cases (e.g. large pytorch installations or airflow installs) this steps can take over 30 seconds on fast machines, so minutes on slow machines. The user is left wondering if anything is happening.
Describe the solution you'd like
I would like to see the following improvements:
Alternative Solutions
I think at a bare minimum there should be a log message that lets the user know what's happening.
Additional context
uv runs installs in parallel, and following their issue tracker it does not appear to be problematic, to do this a cli option to control the maximum number would need to be added, the same as how there is a PR for parallel downloads to do this.
Code of Conduct
The text was updated successfully, but these errors were encountered: