SHA question

Philip Newton philip.newton at
Thu Jan 14 17:41:00 GMT 2010

On Thu, Jan 14, 2010 at 16:20, Matthew Boyle
<mlb-perl at> wrote:
> David Cantrell wrote:
>> On Thu, Jan 14, 2010 at 02:02:51PM +0100, Philip Newton wrote:
>>> That reminds me of how I was disappointed to find that rsync generally
>>> transfers complete files (rather than diffs) if both source and
>>> destination are on a local file system -- before I realised that to
>>> compute the diffs, it would have to read the entire first and second
>>> files, and if it's going to read the entire first file from disk
>>> anyway, it can simply dump it over the second file without checking.
>>> Computing diffs would be more work in this case, not less.
>> Shame that "local" includes "at the other end of a really slow NFS
>> connection to the other side of the world". Mind you, absent running the
>> rsync daemon at the other end and using that instead of NFS, I'm not
>> sure if there's a better way of doing it.
> the --no-whole-file option?  or am i missing something?

Yes - you're missing the fact that in order to compute the differences
(which it has to if it doesn't want to transfer the whole file), it
has to read the entire file over the slow NFS link into your
computer's memory in order to compare it with the "local" file in
order to tell which pieces have changed.

So transferring the whole file is probably faster, at least under the
assumption that reading and writing are about the same speed over that
slow link. (If reading is much faster than writing, then you might
still save some time this way.)

Philip Newton <philip.newton at>

More information about the mailing list