Subject: Re: bug#65760: 29.1; eglot performance issue

From: João Távora <[email-masked]>
Date: Tue, 5 Sep 2023 17:45:32 +0100

On Tue, Sep 5, 2023 at 5:25 PM Eli Zaretskii <[email-masked]> wrote:
> Adding João.

The troubleshooting section in the manual

   https://joaotavora.github.io/eglot/#Troubleshooting-Eglot

has a heading specifically dedicated to these types of
performance problems:

"A common and easy-to-fix cause of performance problems is the length
of the Eglot events buffer because it represent additional work that Eglot
must do. After verifying Eglot is operating correctly but slowly, try
to customize the variable eglot-events-buffer-size (see Eglot
Variables) to 0. This will disable any debug logging and may speed
things up."

So, keeping a rich log and human-readable log is very useful for
debugging but can kill performance if servers send tons of JSON.

Maybe I could review the default value of eglot-events-buffer-size
or find a more fine-grained solution like some new foo-print-level
or foo-print-length variables, likely for jsonrpc.el.  Suggestions
welcome.  Patches doing this are even more welcome.

João