GNU bug report logs - #77588
Catastrophic slowdown in eglot via `flymake-diag-region'

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Sun, 6 Apr 2025 22:51:02 UTC

Severity: normal

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: JD Smith <jdtsmith <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Spencer Baugh <sbaugh <at> janestreet.com>, Eli Zaretskii <eliz <at> gnu.org>, 77588 <at> debbugs.gnu.org, 77588-done <at> debbugs.gnu.org
Subject: bug#77588: Catastrophic slowdown in eglot via `flymake-diag-region'
Date: Tue, 8 Apr 2025 12:24:00 -0400
[Message part 1 (text/plain, inline)]
> On Apr 8, 2025, at 11:42 AM, João Távora <joaotavora <at> gmail.com> wrote:
> 
> The main difficulty seems to be finding a server which supports this mode. Clangd and basedpyright don't seem to. 

basedpyright actually does; it was added about a month ago via pyright:

https://github.com/microsoft/pyright/pull/10055
Implement support for pull diagnostics in Pyright by rchiodo · Pull Request #10055 · microsoft/pyright
github.com

>> - Can we be certain that `eglot--versioned-identifier' is always an integer?
> 
> 
> No. It can be nil. But what it's not nil, it's an integer as specified in the standard.

Then it might be worth switching the test to `(not (eq ...' from `(/= ...'.

>> I don't think the LSP server is to blame here.  Yes, it's sending large messages (too often) and getting behind, but it is dutifully providing the document version number. 
> 
> 
> I beg to differ. A server that is sending useless junk down the wire, however legal that junk is, is a server that should be fixed. As you well know, performance problems arise often from just parsing JSON into expensive Lisp structures.

My point is that the message's version info is an explicit acknowledgement that the information may be out of date by the time the client processes it.  I see no way around that (other than everything working quicker).  A fair critique is just how many push updates arrive.  I suspect if we raise this they'd point us to pull diagnostics anyway.  A nice feature of pull is it can respond "no changes" when there are none.
[Message part 2 (text/html, inline)]
[10055.png (image/png, inline)]

This bug report was last modified 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.