unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "João Távora" <joaotavora@gmail.com>
Cc: Thomas Koch <thomas@koch.ro>, eliz@gnu.org, 61350@debbugs.gnu.org
Subject: bug#61350: Eglot over Tramp freezes with large project
Date: Tue, 28 Feb 2023 13:59:19 +0100	[thread overview]
Message-ID: <87ilfmrlnc.fsf@gmx.de> (raw)
In-Reply-To: <871qmarplp.fsf@gmail.com> ("João Távora"'s message of "Tue, 28 Feb 2023 11:33:54 +0000")

João Távora <joaotavora@gmail.com> writes:

Hi João,

>>> ...is it though? :-) Can a feature that hangs when presented with more
>>> data than usual (however one defines that) be considered stable?
>> Tramp supports ControlMaster since Emacs 24. Eglot is the first case
>> I've heard of problems. I don't deny it
>
> That could be because, as far as I understand, Eglot is the first
> "major" package to use the transparent (make-process ... :file-handler
> t) which, AFAIU, means that Eglot's process, which doesn't really
> transmit _that_ much data, is piped transparently through Tramp's
> process managing the remote file whose buffer M-x eglot is executed in.

Eglot is not the first user of this. But Eglot sends a huge amount of
data over the wire, which seems to trigger the problem.

For example, lsp-mode uses start-file-process-shell-command, which calls
under the hood make-process similarly.

>>>> It is essential. I have been beaten by many Tramp users to support it.
>>> I'd say something "essential" is something you can't live without.  But
>>> that doesn't seem to be the case here.
>> Ohh. You haven't seen how much Tramp has been blamed because it doesn't
>> support it out of the box.
>
> I understand, but it's the occasionally-exploding racecar all over
> again.  I understand your reasoning: you're betting that it's acceptable
> for the ocassionally-exploded user to learn opt-out for a slightly
> slower car.
>
> The thing is they will probably blame the steering wheel, Eglot,
> because -- Tramp being "transparent" -- that's what they see.
>
> Ideally, we would just fix this.  It would be nice to understand what
> actually happen and what information is lost, presumably to
> ControlMaster's gremlins.  I think bringing in Eli's knowledge of
> process.c internals could be beneficial here.

I'm not against changing Tramp, really. But first I must understand
what's the problem, and why a change will solve it. Without other
collateral damages.

> Here are some questions.  Apologies in advance if some of them are in
> the "FM".

The Tramp manual misses detailed implementation notes. On my TODO for
years, but it didn't happen until now.

> 1. When I open a single remote file on a remote host, I am creating
>    Tramp process, I presume.

Yes. In Tramp slang, this is the (main) connection process.

> 2. If I kill this buffer and re-visit it, is the Tramp process re-used
>    somehow or is a new one created?

The same connection process is used.

> 3. If I open another nearby file on the same host, I am sharing that
>    Tramp process?

Yes, as long as the remote identification (method, user, host) are the
same.

> 4. What about in a different host?

A new connection process. Also if just the method or user
changes. "/ssh::" and "/scp::" use different connection processes.

> 5. Is there any way to get an overview of which Tramp processes are
>    "responsible" for each set of remote files?

The so called connection buffers. This is always a buffer with the name
"*tramp/METHOD HOST*" or  "*tramp/METHOD USER@HOST*", depending whether
there is a user name, or not. See function tramp-buffer-name. The Tramp
connection processes are bound to these buffers.

> 6. Now if I M-x eglot in a Tramp remote file that I had been working on
>    Eglot-less for a while, is the Eglot process tunneled through the
>    existing Tramp process, reusing it, or is a new one started?

It depends. A synchronous process, created by process-file, is tunnelled
through the connection process. An asynchronous process, created by
make-process or start-file-process, is a new one.

> 7. If an existing process is reused, is there any way to force Tramp to
>    open a new one, perhaps with slightly different configuration
>    options?

No need for synchronous processes. And for asynchronous processes, they
have their own process. If configuration options are changed prior the
make-process call, they apply.

> João

Best regards, Michael.





  reply	other threads:[~2023-02-28 12:59 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 16:33 bug#61350: Eglot over Tramp freezes with large project Thomas Koch
2023-02-17  9:54 ` Michael Albinus
2023-02-17 10:33   ` Thomas Koch
2023-02-18 11:10     ` Thomas Koch
2023-02-18 12:07       ` Michael Albinus
2023-02-23 11:55         ` Thomas Koch
2023-02-25 14:36           ` Michael Albinus
2023-02-23 12:17 ` João Távora
2023-02-23 14:18   ` João Távora
2023-02-23 14:47     ` Thomas Koch
2023-02-23 15:22       ` João Távora
2023-02-24 17:19         ` Michael Albinus
2023-02-24 17:45           ` João Távora
2023-02-25 14:27             ` Michael Albinus
2023-02-25 23:09               ` João Távora
2023-02-26 10:24                 ` Thomas Koch
2023-02-26 15:58                   ` Michael Albinus
2023-02-26 17:23                 ` Michael Albinus
2023-02-26 21:13                   ` João Távora
2023-02-26 21:45                     ` João Távora
2023-02-27  7:53                       ` Michael Albinus
2023-02-27  9:42                         ` João Távora
2023-02-27 20:11                           ` Michael Albinus
2023-02-27  7:47                     ` Michael Albinus
2023-02-27  9:35                       ` João Távora
2023-02-27 20:10                         ` Michael Albinus
2023-02-28  0:10                           ` João Távora
2023-02-28 10:38                             ` Michael Albinus
2023-02-28 11:33                               ` João Távora
2023-02-28 12:59                                 ` Michael Albinus [this message]
2023-02-28 14:41                                   ` João Távora
2023-02-28 14:18                             ` Michael Albinus
2023-02-28 14:51                               ` João Távora
2023-02-28 15:01                                 ` Michael Albinus
2023-02-28 17:55                                   ` Thomas Koch
2023-03-01 14:10                                     ` João Távora
2023-03-01 16:19                                       ` João Távora
2023-03-02 11:01                                       ` Michael Albinus
2023-03-02 11:22                                         ` João Távora
2023-03-02 11:50                                           ` Michael Albinus
2023-03-05 11:21                                           ` Michael Albinus
2023-03-05 11:45                                             ` Thomas Koch
2023-03-05 12:23                                               ` Michael Albinus
2023-03-07 12:49                                                 ` Michael Albinus
2023-03-07 13:04                                                   ` Thomas Koch
2023-03-07 13:33                                                     ` João Távora
2023-03-07 13:52                                                       ` Michael Albinus
2023-03-07 14:03                                                         ` João Távora
2023-03-07 14:31                                                           ` Michael Albinus
2023-03-11  9:00                                                             ` Michael Albinus
2023-03-11 10:14                                                               ` Thomas Koch
2023-03-11 11:47                                                                 ` João Távora
2023-03-11 12:27                                                                 ` Michael Albinus
2023-03-11 11:42                                                               ` João Távora
2023-03-11 12:44                                                                 ` Michael Albinus
2023-03-11 14:01                                                                   ` João Távora
2023-03-11 14:25                                                                     ` Michael Albinus
2023-03-12  0:48                                                                       ` João Távora
2023-03-12 10:22                                                                         ` Michael Albinus
2023-03-14 11:01                                                                           ` Michael Albinus
2023-03-14 15:00                                                                             ` Michael Albinus
2023-03-14 15:19                                                                               ` João Távora
2023-03-14 15:42                                                                                 ` Michael Albinus
2023-03-15 17:47                                                                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-15 18:05                                                                                     ` João Távora
2023-03-15 18:30                                                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-15 19:44                                                                                         ` João Távora
2023-03-15 20:14                                                                                           ` João Távora
2023-03-15 21:34                                                                                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-15 21:55                                                                                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-16 13:28                                                                                               ` João Távora
2023-03-18 12:34                                                                                               ` Michael Albinus
2023-03-15 21:43                                                                                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-15 21:49                                                                                             ` João Távora
2023-03-16  6:24                                                                                               ` Jim Porter
2023-03-16 13:25                                                                                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-16 13:28                                                                                                 ` João Távora
2023-03-16 15:58                                                                                                   ` João Távora
2023-03-16 20:36                                                                                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-16 22:04                                                                                                       ` João Távora
2023-03-07 13:47                                                     ` Michael Albinus
2023-03-06 12:42                                             ` Michael Albinus
2023-03-06 13:45                                               ` João Távora
2023-03-06 13:42                                             ` João Távora
2023-03-02 10:40                                     ` Michael Albinus
2023-02-28 19:37                                   ` João Távora
2023-03-01  8:44                                     ` Michael Albinus
2023-03-01 11:15                                       ` João Távora
2023-03-01 10:46                                 ` Gregory Heytings
2023-03-01 11:08                                   ` João Távora
2023-03-01 11:23                                     ` Gregory Heytings
2023-03-01 11:37                                       ` João Távora
2023-03-01 14:51                                         ` Michael Albinus
2023-03-01 15:02                                           ` Gregory Heytings
2023-04-24  1:44 ` Aaron Madlon-Kay
2023-05-05 11:32   ` Michael Albinus
2023-05-05 13:14     ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 14:53       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilfmrlnc.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=61350@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=thomas@koch.ro \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).