Skip to content

Conversation

mgeisler
Copy link
Collaborator

@mgeisler mgeisler commented Sep 20, 2025

This introduces a new local GitHub action for installing Debian packages. I noticed that it often takes several minutes to install a few small packages, and a large part of that time is spent updating the man page database:

2025-09-20T11:39:25.3001853Z Setting up yapf3 (0.33.0-1) ...
2025-09-20T11:39:25.3045329Z Processing triggers for libc-bin (2.39-0ubuntu8.5) ...
2025-09-20T11:39:25.4420933Z Processing triggers for man-db (2.12.0-4build2) ...
2025-09-20T11:41:42.8522570Z Processing triggers for install-info (7.1-3build2) ...

Excluding the documentation files should make the man-db run much faster. Compare these two runs:

@mgeisler mgeisler force-pushed the optimized-apt-install branch 16 times, most recently from 4e893f6 to 182e62d Compare September 20, 2025 13:45
This introduces a new local GitHub action for installing Debian
packages. I noticed that it often takes several minutes to install a
few small packages, and a large part of that time is spent updating
the man page database:

    2025-09-20T11:39:25.3001853Z Setting up yapf3 (0.33.0-1) ...
    2025-09-20T11:39:25.3045329Z Processing triggers for libc-bin (2.39-0ubuntu8.5) ...
    2025-09-20T11:39:25.4420933Z Processing triggers for man-db (2.12.0-4build2) ...
    2025-09-20T11:41:42.8522570Z Processing triggers for install-info (7.1-3build2) ...

Excluding the documentation files should make the man-db run much
faster. Compare these two runs:

* Before: 2m 41s, see
https://github.com/google/comprehensive-rust/actions/runs/17879390708/job/50845084995.
* After: 11s, https://github.com/google/comprehensive-rust/actions/runs/17880418155/job/50847334471
@mgeisler mgeisler force-pushed the optimized-apt-install branch from 182e62d to d17ba2b Compare September 20, 2025 13:57
@mgeisler mgeisler changed the title Exclude documentation to optimize apt install Optimize apt update calls Sep 20, 2025
Copy link
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of a sub-action!

Copy link
Collaborator

@michael-kerscher michael-kerscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement. Thank you!

@mgeisler
Copy link
Collaborator Author

As a further optimization, I was playing with adding --no-install-recommends to the apt-get invocation. However, that would need some fiddling since we do depend on some of the recommended packages (the build fails when I add it).

@mgeisler mgeisler merged commit 11f2831 into main Sep 22, 2025
39 checks passed
@mgeisler mgeisler deleted the optimized-apt-install branch September 22, 2025 07:33
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.

3 participants