-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Speedup printing of installed package versions #5127
Conversation
Hey @StephanErb! This is an enhancement, and we're currently in a beta phase for pip 10.0. This PR will have to wait until after pip 10.0's full release. I hope you understand, cheers! :) |
I am aware. All good :) |
@pradyunsg just to clarify: Do you plan to land this in 10.0.1 or 10.1.0? |
10.1.0 |
@StephanErb How did you generate that chart? aside: 10.1.0 -> 18.0 since we've changed our versioning scheme. :) |
@pradyunsg I used the |
Cool. Thanks. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the NEWS fragment to be a bugfix one? This should be something that's mentioned in the NEWS. :)
The installed set of packages is already fixed and no longer changing. It is therefore safe to reuse a single `pkg_resources.WorkingSet` for all invocations of `get_installed_version`.
db9809c
to
35c1ab2
Compare
Done :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Profiling indicates a large amount of time is spend in
get_installed_version
.When printing all installed package versions, the installed set is already fixed and no longer changing. It is therefore safe to reuse a single
pkg_resources.WorkingSet
for all invocations ofget_installed_version
.This yields a small performance improvement: