Repository navigation
perf(os): skip the package manager query when nothing changed - #1246
Open
karlitschek wants to merge 1 commit into
Open
karlitschek wants to merge 1 commit into
karlitschek wants to merge 1 commit into
Conversation
karlitschek
force-pushed
the
perf/os-status-skip-unchanged
branch
from
October 25, 2026 19:25
36dd600 to
4ffbcc6
Compare
The hourly operating system job ran the package manager's full update query every time: apt-get -s dist-upgrade, dnf check-update with updateinfo and rpm -qa, zypper list-patches/list-updates/locks. dnf and zypper load all repository metadata for this, which costs seconds of CPU and a lot of memory, although the answer can only change when the installed packages, the repository metadata or the configuration that selects or holds back updates changed. Each package manager now names those inputs: the package database (dpkg status, rpmdb, pacman's local directory, apk's installed file), the repository metadata (apt lists, the dnf and zypp caches, pacman's sync databases, apk indexes) and the sources, pinning and lock files. Every run records their modification times with the status. The hourly job reuses the previous pending updates, held packages and last upgrade when the times are identical, the same package manager on the same release produced a complete answer, and that answer is less than a day old; reboot, services, time sync and the other checks still run. Any path that cannot be checked, a failed or partial query, more than 500 updates, updates from the root helper and Arch with network access (checkupdates and arch-audit answer from the network) mean a full run. "Check now" and occ serverinfo:os-status --refresh always do one. First-seen times are still applied on every run, so how long an update has been pending keeps counting. The status records when the updates were last checked and whether they were reused, and the occ command shows the time. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Frank Karlitschek <[email protected]>
karlitschek
force-pushed
the
perf/os-status-skip-unchanged
branch
from
October 25, 2026 19:45
4ffbcc6 to
2c80f47
Compare
karlitschek
marked this pull request as ready for review
October 25, 2026 20:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on
feat/os-status-collector(#1214).AI disclosure: this change was written with Claude Code (claude-opus-5-5) and is to be reviewed by the author before it leaves draft; every commit carries an
Assisted-bytrailer.馃 Generated with Claude Code