https://bugs.kde.org/show_bug.cgi?id=488084

--- Comment #3 from P Fudd <bugs.kde....@ch.pkts.ca> ---
The number of packages that change per day is usually not many, less than 1%. 

The time required to download the list of new packages to add and old packages
to remove from the metadata cache should be proportional to the number of
changes.  

Instead, it appears that the contents of the entire package cache directory
/var/cache/dnf/ is discarded and redownloaded if the age of the cache is older
than metadata_expire in /etc/dnf/dnf.conf, which defaults to 48 hours.

I realize that the package cache directory contains metadata from all of the
repositories configured in /etc/yum.repos.d, dependency calculations can be
drastically altered if there are changes in any of the repositories, and
getting all repositories to support some modified protocol would be like
herding cats.

However, most of the extra repositories added to a system are tiny compared to
the repositories for the OS, they don't affect the overall time significantly.

There are several possible optimizations:
* Calculate a checksum of the repository metadata on the server, and publish it
via DNS.  A single DNS query could then tell you if you're up to date.
* Record changes to the repository metadata as a transaction log stored in an
ever-growing file that is rotated as needed; publish the current name and size
of the file via DNS, or implement something like curl's `--continue-at` feature
for resuming interrupted downloads.
* Try using rsync delta-transfer algorithm for updating the metadata; it
handles inserts and deletions in the middle of binary files easily.

The current method of downloading the entire repository's metadata is wasting
bandwidth and money.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to