On 30/8/2025 13:01, Daniel J. Luke wrote:
On Aug 29, 2025, at 10:08 PM, Joshua Root <[email protected]> wrote:
Maybe we could somehow extract only updated files?
If we get (maybe from newly stored metadata, perhaps in the portindex) the max(date) of
the set of files we could use one of tar's "newer" options so it would only
have to write out newer files.
It turns out to be a little more complicated than that, since we also
want to delete files that are no longer in the tarball, and preferably
also restore files that have been modified locally. This does that and
cuts a decent chunk of time off of syncing:
<https://github.com/macports/macports-base/commit/df4d61b1e1cd618adc2b0797c5061b5d76eae5f4>
It's likely possible to do better, but it may have to involve doing it
in C and using libarchive so it can all be done in one pass through the
archive.
- Josh