|Subject:||Re: tramp (2.1.15); Unclear doc for rsync method|
|Date:||Sun, 12 Apr 2009 23:41:22 +0200|
|User-agent:||Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2|
On 04/12/2009 11:44 AM, David Abrahams wrote:|
From the TRAMP info file: `rsync' -- `ssh' and `rsync' Using the `ssh' command to connect securely to the remote machine and the `rsync' command to transfer files is almost identical to the `scp' method. While `rsync' performs much better than `scp' when transferring files that exist on both hosts, this advantage is lost if the file exists only on one side of the connection. That's pretty un-specific. *Where*, exactly, does the file need to exist on both machines in order to get this advantage?
Perhaps I wrote it and I was waving my hand because I didn't know the correct answer either :-(
Of course, on a superficial level, the answer is clear: Suppose you execute the following sequence of commands:
rsync $REMOTE_FILE $LOCAL_FILEIn this case, the second rsync command can execute faster because it only needs to transfer the small change and not the whole file. And if tomorrow someone changes the $REMOTE_FILE, and the day after tomorrow, you repeat those three commands, and if you have kept the $LOCAL_FILE, then even the first rsync command in that sequence may run faster, for it too only needs to transfer the changes.
The more interesting question is how does this interact with Tramp? That is the question I was trying to evade (if indeed it was me who wrote this). I believe that it works like this:
We could speed up C-x C-s if we could hook into the saving procedure, and after renaming foo to its backup foo~, we would then copy foo~ back to foo before using rsync to update its content from the local copy. I am afraid this might not be doable within the Emacs framework.
I wonder if this is worth the effort or not. This would only help people who use Tramp to edit large remote files on a routinely basis. Tramp is somewhat optimized for the small-files case (by its inline transfer methods, which are required for multiple hops (unless Michael changed this)).
|[Prev in Thread]||Current Thread||[Next in Thread]|