unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: 66669@debbugs.gnu.org
Subject: bug#66669: 30.0.50; [EGLOT] Emacs freezes when server sends a ton of progress notifications
Date: Sat, 21 Oct 2023 22:01:50 +0100	[thread overview]
Message-ID: <CALDnm51jq60RV4jjrJq1xfQY_=my7Fhwy+NHSKYxUojCFr1Xxw@mail.gmail.com> (raw)
In-Reply-To: <E6EADDD0-DDC6-482E-8518-BD318B5EE76C@gmail.com>

On Sat, Oct 21, 2023 at 8:11 PM Yuan Fu <casouri@gmail.com> wrote:
>
> X-Debbugs-CC: joaotavora@gmail.com
>
> I use rust’s language server (rust-analyzer) with eglot. And
> whenever I turn eglot on for a project, Emacs freezes for a good
> 30 seconds, busy updating the eglot progress indicator, before I
> can do anything. I think the reason is that the rust language server
> sends a ton of progress notifications, which completely blocks Emacs
> before it’s done.

hi Yuan,

Two things:

* Would be nice to have a reproduction recipe.  I have rust-analyzer but
  one project where I try it regularly, the "bevy" graphics engine [1]
  Seems to work OK there.  You say "a project", but for bevy
  it starts up fast (maybe not even half a second) and works quite well.

  No Emacs freeze at all.  Tried removing the cache with git clean -fdx and
  I get all the notifications cleanly with no slowdown.

  So please include Emacs versions (master preferred, should be trivial
  for you), Eglot version, rust-analyzer version and preferably an Emacs
  -Q invocation with the simplest Rust project you can share that
  exhibits this behaviour.

* Have you profiled?  Have you tried setting eglot-events-buffer-size
  to 0 (and restart Eglot) as suggested in the Eglot manual?  Many
  performance problems are due to JSON objects being pretty printed in
  the Eglot events buffer (BTW some users ask me to  turn it to 0 by
  default, but the pros don't outweigh the cons, which in this case is
  we would lose a valuable tool for newbie users with exotic servers to
  send me their debug data easily)

João

[1] https://github.com/bevyengine/bevy





  reply	other threads:[~2023-10-21 21:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 19:10 bug#66669: 30.0.50; [EGLOT] Emacs freezes when server sends a ton of progress notifications Yuan Fu
2023-10-21 21:01 ` João Távora [this message]
2023-10-22  4:50 ` Eli Zaretskii
2023-10-22 14:52   ` João Távora
2023-10-23  0:39     ` Yuan Fu

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='CALDnm51jq60RV4jjrJq1xfQY_=my7Fhwy+NHSKYxUojCFr1Xxw@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=66669@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    /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).