emacs-devel
[Top][All Lists]
Advanced

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

Re: Remote asynchronous processes


From: Philipp Stephani
Subject: Re: Remote asynchronous processes
Date: Tue, 4 Aug 2020 18:48:39 +0200

Am Mo., 13. Apr. 2020 um 12:19 Uhr schrieb Michael Albinus
<michael.albinus@gmx.de>:
>
> Hi,
>
> On the Tramp ML, there is a discussion about performance of remote
> asynchronous processes. start-file-process / make-process take too much
> time to finish.
>
> One of the reasons is, that Tramp opens first a shell on the remote
> host, performs sanity checks, and runs the command after that. Well, I
> cannot change this in general; the sanity checks have been added due to
> feedback from users.
>
> One idea to change the situation is, to remove all sanity checks from
> make-process. That is, if a user has a default directory
> "/ssh:user@host:/path/to/dir", and if he calls
>
> --8<---------------cut here---------------start------------->8---
> (make-process
>  :name "test"
>  :buffer (current-buffer)
>  :command '("cmd")
>  :file-handler t))
> --8<---------------cut here---------------end--------------->8---
>
> this is translated directly into
>
> --8<---------------cut here---------------start------------->8---
> ssh -l user -o ControlMaster=auto -o ControlPath='tramp.%C' \
>   -o ControlPersist=no host "cd /path/to/dir; cmd"
> --8<---------------cut here---------------end--------------->8---
>
> This would improve performance significantly. The drawback is, that
> Tramp does not perform convenience checks, like password handling.
>
> start-file-process would not be changed, and it behaves like before.
>
> Comments?

I think the approach is great, thanks for picking this up. A few minor comments:
- I'd change start-file-process in lockstep with make-process. Since
start-process is nowadays just a wrapper around make-process, it would
be somewhat confusing if start-file-process behaved significantly
differently.
- I'd probably leave out the ControlMaster options entirely and rely
on a working SSH config with a control master already started. That
way the control master can be reused across arbitrary processes on the
client machine, not just Emacs.



reply via email to

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