From: Michael Albinus <michael.albinus@gmx.de>
To: "João Távora" <joaotavora@gmail.com>
Cc: Thomas Koch <thomas@koch.ro>, 61350@debbugs.gnu.org
Subject: bug#61350: Eglot over Tramp freezes with large project
Date: Sat, 11 Mar 2023 13:44:33 +0100 [thread overview]
Message-ID: <87fsabh2z2.fsf@gmx.de> (raw)
In-Reply-To: <87mt4jzf8q.fsf@gmail.com> ("João Távora"'s message of "Sat, 11 Mar 2023 11:42:13 +0000")
João Távora <joaotavora@gmail.com> writes:
Hi João,
> I think the patch goes in the right direction. The force resetting of
> 'timeout' to 0, which you highlighted earlier, is odd.
Yes. But I've tried first w/o this setting, and the recipe from Thomas
still didn't work.
> + (dolist (p (delq proc (process-list)))
> + (when (tramp-file-name-equal-p
> + (process-get proc 'vector) (process-get p 'vector))
> + (setq timeout (or timeout 0))
> + (accept-process-output p 0 nil t)))
>
> That's because callers of 'tramp-accept-process-output' who call it with
> TIMEOUT=nil will now see their expectations violated depending on
> conditions they do not control. You fully control these callers, so you
> may know better, but I think this patch makes more sense, because it
> keeps the contract.
In fact, I'm even not sure that a nil timeout is still needed. This is
something from the very beginning of Tramp. Maybe I shall review the
code whether we still need a nil timeout. Because its initial idea, wait
in accept-process-output until the remote shell prompt appears, is no
longer needed, because we call tramp-accept-process-output (and
therefore accept-process-output) in a loop. This is something to be
changed later on.
A short scan over the Tramp sources shows, that there are 12 calls of
tramp-accept-process-output with a TIMEOUT of 0, and only two other
calls with a nil TIMEOUT. And these two calls are already in while loop,
so I guess it would be also OK to give them a default TIMEOUT of 0.
I will try it, but this needs lot of regression tests (I have 100+
different configurations to run tramp-tests.el).
> + (dolist (p (delq proc (process-list)))
> + (when (tramp-file-name-equal-p
> + (process-get proc 'vector) (process-get p 'vector))
> + (while (accept-process-output p 0 nil t))))
> (with-current-buffer (process-buffer proc)
> (let ((inhibit-read-only t)
> last-coding-system-used
>
> This is even more "conservative" than your patch, because it deviates
> less from the current behaviour. I've tested it (first removing the
> eglot.el workaround) with my reproduction recipe to a 100% success rate
> in 6-7 experiments (whereas without it it is 0%).
Hmm, in my experience there were still one or two blocking tests wit
Thomas' recipe, IIRC. This is because the blocking situation, data is
going through the only ssh socket for both tramp-accept-process-output
and jsonrpc, is not unblocked then.
So I would prefer to keep this (setq timeout (or timeout 0)) for
now. And I will reviw the code, whether tramp-accept-process-output
still needs a TIMEOUT ARGUMENT as sketched above.
>> I plan to install the patch next days on master, unless you oppose.
>
> I don't, but consider my alternative.
I consider it by removing the TIMEOUT argument, if possible.
> João
>
> PS: And I also think that Eglot over Tramp does seem to have become
> faster with ControlMaster, at least in a subjective evaluation.
Of course. That is the reason behind using it.
Best regards, Michael.
next prev parent reply other threads:[~2023-03-11 12:44 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
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 [this message]
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=87fsabh2z2.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=61350@debbugs.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).