tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No support for direct copying of directories


From: Troy Hinckley
Subject: Re: No support for direct copying of directories
Date: Fri, 23 Aug 2024 12:18:26 -0500

Thanks Michael,
I applied the patch and it worked great! I noticed that the start of the patch removed the file existence check

- (unless (file-exists-p dirname)
-          (tramp-error v 'file-missing dirname))

Wanted to make sure that was intentional.

-Troy Hinckley
On Aug 23, 2024 at 10:50 AM -0500, Michael Albinus <michael.albinus@gmx.de>, wrote:
Troy Hinckley <troyhinckley@gmail.com> writes:

Hi Troy,

Copying files when both the source and destination are on the same
remote host is fast because tramp does a direct copy in
tramp-do-copy-or-rename-file-directly. However there is no such
support when copying a directory. When copying directories on a remote
host via dired it takes a very long time, A directory that takes 100ms
to copy via remote shell takes tramp almost a full minute. It looks
like there is only support for direct copying files, not directories.
Why is that? It seems like an easy performance win, but I don’t know
if there is more complexity to it.

There might be some edge cases where it is problematic, but we'll see it
only when reported by users. I gave it a try, and I have enhanced
tramp-sh-handle-copy-directory accordingly. It passes the checks in
tramp-tests.el, which is a good sign.

Would you like to test it? I've appended the patch, it applies on top of
Tramp 2.7.1.

-Troy Hinckley

Best regards, Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]