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

Call apt-cache show once with list of packages #557

Closed
wants to merge 1 commit into from
Closed

Call apt-cache show once with list of packages #557

wants to merge 1 commit into from

Conversation

jacobperron
Copy link
Contributor

Attempt to resolve #554.

Instead of checking for virtual packages individually, now the entire list of packages to check are passed to apt-cache show. In my tests involving 58 uninstalled packages, this change (in combination with #556) has resulted in a speed up of 3 minutes.

Version Time
0.11.8 3m13.276s
this commit 7m13.761s
#556 3m7.361s
this commit + #556 0m8.088s

It is important to note that I have not had the opportunity to explicitly test with actual virtual packages (ie. the for-loop at L144 never executes since virtual_packages has been empty in my test cases).

@mathias-luedtke
Copy link
Contributor

mathias-luedtke commented Oct 21, 2017

This looks reasonable, but it will conflict with #521 (as-is).
@jacobperron: Can you please benchmark #521 as well?

@jacobperron
Copy link
Contributor Author

@ipa-mdl I ran the same benchmark test for #521 with the result 0m26.544s.

@mathias-luedtke
Copy link
Contributor

mathias-luedtke commented Oct 22, 2017

Thanks, this looks promising!
However, apt-cache showpkg can display for one package only.
Together with #556 it should be fast enough :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debian.py check for virtual packages is slow
2 participants