-
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
Performance of the new resolver when installing/upgrading many packages at once #9126
Comments
The above is with |
Sounds like you’re getting the benefit from #9078 (merged after 20.2.4). Closing, feel free to reopen if you don’t think this assessment is correct. |
The new resolver is always going to be slower, since it actually tries to make sure your requirement set is consistent. You do not need those checks here since all your requirements are pinned exactly with |
|
Overall, everything that you've observed is expected. There's a (usually small) performance hit when using the new resolver -- which is only used in the install, wheel and download commands BTW. It's a new chunk of code, with different performance characteristics than the old resolver, because this one takes dependency conflicts into account. |
I do understand that in principle. I still wonder what it is actually doing for 45 (now 7, but still) seconds. If it's not network requests and associated delays, I see nothing that should take that long. Then again, I am only an interested user, so there may be good reasons for that, and if you tell me that's expected, I am going to believe you :)
I'm not sure this is correct: note that I am using
I'm not sure this is correct, either: what if a package is updated to include a new requirement? I certainly want these to be installed, too.
But the dependency resolvers needs to make these exact same queries, don't they? Note that my |
@bersbersbers thank you for your questions! Could I ask you to copy or move your last comment to #9187 if you are still experiencing the problem with pip 20.3? Sorry for the bother. |
What did you want to do?
I liked to use
to update all packages. However, this updates packages beyond the requirements of installed packages, which
pip
ignores, leading to conflicts.Same thing even for
Now, the new resolver looks promising in the second case (it still ignores installed packages, so
--outdated
is not an option, but that's not too much of an issue):It upgrades only what's possible to upgrade without causing conflicts, and even downgrades what's required to resolve conflicts. It's basically a one-stop-shop to fix a set of installed packages. Nicely done!
However, it's slow:
pip list --outdated
takes ~15spip list | sed | xargs pip install
takes ~9s with the old resolver (in its 2nd run when all package installation have finished), but it takes ~55s with the new resolver (again, in its 2nd run without package installation)I'm surprised that
pip list | sed | xargs pip install
is faster thanpip list --outdated
because I expect the latter to do much more than the former, but that's not what I am worried about. But note how much slowerpip list | sed | xargs pip install
is with the new resolver. I first suspected additional (repeated) HTTP requests for the same packages as an issue, butshows the same (125) requests as
Additional information
The text was updated successfully, but these errors were encountered: