emacs-devel
[Top][All Lists]
Advanced

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

Re: Remote asynchronous processes


From: Michael Albinus
Subject: Re: Remote asynchronous processes
Date: Tue, 14 Apr 2020 11:03:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Philippe Vaucher <address@hidden> writes:

> Hello,

Hi Philippe,

>     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.
>
> It'd be great to have the list of checks that are done and the reasons
> to see if they still make sense nowadays. Maybe these checks were
> added to safe-guard against silly terminals/implementations but can be
> ignored in recent times.

I've started with such an analysis on the Tramp mailing list, see thread
starting at
<https://lists.gnu.org/archive/html/tramp-devel/2020-03/msg00000.html>. This
work is continued with more fine-tuning, but this isn't the topic of
*this* discussion.

>     One idea to change the situation is, to remove all sanity checks
>     from
>     make-process.
>
>     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.
>
> I'm not clear on make-process vs start-file-process usage, but I
> assume the former is used by API developers and the later is called by
> TRAMP, so we still get the sanity checks for normal TRAMP usage?

Currently, they behave similar (start-file-process is just a wrapper
around make-process in Tramp). I propose to change this.

> If you ask _my_ preferences I'd remove the sanity checks and require
> sane terminals, maybe offer some tramp-sane-terminal-p that could run
> the sanity checks for debugging. That or cache the sanity checks so
> you only run them once on the initial connection but never later on. I
> understand my position is probably not everyone's position tho :-)

Tramp is intended to work on most remote systems which run a bournish
shell. It does not know in advance the properties of that shell, so it
runs the sanity checks. Tramp caches the properties as much as possible
already.

But that's not the point of my proposal. If we change make-process such a
way that it calls the command directly, we will gain a performace
boost. Philipp Stephani has shown some figures in the discussion
mentioned above. Maybe he can explain more detailed which kind of
performance requirements he has in mind, and the use case(s).

However, we will loose features of remote asynchronous processes. At
least (and not comprehensive), processes started via make-process

- are not checked for passwords or other interactive dialogues
- do not not support multi-hops anymore
- cannot be killed via interrupt-process (??? I'm not sure)
- do not tell the remote tty
- ...

Processes started via start-file-process won't change their behavior.

> Kind regards,
> Philippe

Best regards, Michael.



reply via email to

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