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

init: massively speed up apt/pacman/xbps deps install #1324

Merged
merged 5 commits into from May 1, 2024

Conversation

JamiKettunen
Copy link
Contributor

@JamiKettunen JamiKettunen commented Apr 2, 2024

For more details check the commit descriptions. Originally this just had apt changes, let me know if I should split the others to different PRs.

apt

Similar to the previous apk optimization (#1298) instead of checking each package one by one instead grab the matching ones from apt list and pass them directly over to apt-get install.

pacman

On Arch we can grep the pacman -Ssq output (all packages) for the ones we're interested in.

--needed was already used previously but was dropped with bdf78c3, commented there as well.

xbps

Similar to Arch on Void we can instead grep the xbps-query -Rs '*' output (all packages) for the ones we're interested in after filtering out install status, description and versions.

distrobox-init Fixed Show fixed Hide fixed
@JamiKettunen JamiKettunen force-pushed the faster-apt branch 2 times, most recently from c4dd106 to f6295bb Compare April 2, 2024 22:23
Similar to the previous apk optimization instead of checking each
package one by one instead grab the matching ones from "apt list" and
pass them directly over to "apt-get install".

This happens to start installing libvte-2.90-common on ubuntu:14.04
where libvte-2.9*-common doesn't match anything when given to apt*
commands directly.

On my end non-toolbox Ubuntu 22.04 and 14.04 images saw a setup time
reduction from ~68 and 80 seconds respectively to just ~44 seconds each!
Also drop both the duplicate vte-common & redundant opengl-driver (mesa
is always picked as default provider) package entries, (once again)
avoid re-installing already up-to-date packages; on my end the setup
time for the non-toolbox arch image was reduced from ~19 seconds to ~13
seconds.
On my end the setup time was reduced from ~25 seconds to ~19 seconds.
@JamiKettunen JamiKettunen changed the title init: massively speed up apt-get deps install init: massively speed up apt/pacman/xbps deps install Apr 4, 2024
@89luca89 89luca89 added the CI label May 1, 2024
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
@89luca89 89luca89 removed the CI label May 1, 2024
@89luca89
Copy link
Owner

89luca89 commented May 1, 2024

Hi @JamiKettunen this won't work on older Debian/Ubuntu, as apt has an unstable CLI interface
Took the liberty to reimplement your idea but with apt-cache show so that we keep backward compatibility 👍

Anyway that's one hell of a job thank you!

@89luca89 89luca89 merged commit 618bf90 into 89luca89:main May 1, 2024
8 checks passed
@JamiKettunen JamiKettunen deleted the faster-apt branch May 1, 2024 19:13
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.

None yet

2 participants