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

debian.py check for virtual packages is slow #554

Closed
jacobperron opened this issue Oct 4, 2017 · 2 comments
Closed

debian.py check for virtual packages is slow #554

jacobperron opened this issue Oct 4, 2017 · 2 comments

Comments

@jacobperron
Copy link
Contributor

In debian.py checking for remaining virtual packages one-by-one in a loop at L189 is quite slow for large lists of packages. This is due to the apt-cache show command. In particular, I'm looking to cut down on build times in some of my pipelines.

I've noticed that calling apt-cache show on packages sequentially is a lot slower than passing all packages at once. Example execution times for 58 packages from the shell:

time cat test_pkgs | xargs -L1 apt-cache show

1m 12.915s

time apt-cache show $(cat test_pkgs)

0m 2.920s

I'm exploring possibilities for enhancement of the Python script.

As an aside, I noticed that packages are checked twice over. Does this have something to do with separating build and run depends?

@Nickolaim
Copy link
Contributor

@jacobperron - is the issue still valid? Pull request #521 touches on this functionality, and I see in the code cmd = ['apt-cache', 'showpkg'] + list(packages) that is probably doing what was requested in the issue.

If it is not the case, please provide a repro, I will be happy to work on it.

@jacobperron
Copy link
Contributor Author

@Nickolaim Does not appear to be an issue any more. Cheers!

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

Successfully merging a pull request may close this issue.

3 participants