From c8088839270c8994c0533d2fbfec7e5ade69cb57 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 18:07:34 +0000 Subject: populate file: skip sources rsync would find nothing to do for Each rsync run costs several round trips to the target, and about 45 ms of rsync waiting for its own processes, also with nothing to transfer, so a run with many file sources and nothing to change took long: 25.5 s for the bench's 50 file, 30 symlink, and 20 git sources with 30 ms to the target, 20 s of that waiting for round trips. Right after taking the lock, one command lists the target paths of the file sources that are directories, compared by size and time, and whose lock file the flakes step doesn't rewrite, with find. At its turn, each such source lists what rsync would transfer: with find, if nothing excludes or filters anything, else with rsync --list-only, which is also the run checking the .rsync-filter files, instead of a dry run. If both listings have the same entries, with mode and path, and for files size and time in whole seconds, and for symlinks the target, which is what rsync's quick check compares, neither break_hard_links nor rsync runs. Entries populate can't compare (paths with control characters, devices), and sources that need --insecure-links, run rsync. The scenario file-skip checks that an unchanged source keeps another hard link of a file, which break_hard_links would break, and that a file too many, a file's time, a directory's mode, and an excluded file make the sources deliver again. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f5f4a2..b58b6eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,10 @@ - `evalSource` leaves out a source whose type is set to null, e.g. with the new `optionalSource`, which returns a type's settings if a condition holds, and else null. +- A `file` source that rsync would find nothing to do for doesn't run rsync: + populate compares listings of the source and the target first, one + command on the target for all file sources, which saves several round + trips for each unchanged one. ## 1.31.1 -- cgit v1.3.1