On Apr 18, 2024 18:22, João Távora <joaotavora@gmail.com> wrote:

On Thu, Apr 18, 2024 at 4:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Thu, 18 Apr 2024 16:00:53 +0100
> > Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> >
> > So to summarize:
> >
> > * we don't use it "everywhere".  We use it once where it matters.
> > * the "punishment" isn't really severe and the little there was
> >   of it has been completely  avoided with my changes.
>
> If the last point is true, it should be confirmed by timing the old
> and the new code.

It is true at least from what I could gather are Theodor's
experiments.  Theodor states publishDiagnostics is a hotspot, but
I couldn't find it in his files emacs-29-before-everything and
emacs-30-before.  The hotspots I could recognize from that data
are 100% solved by my patch.  The appeared _faintly_ in my tests
(hence the comment about the "severity" of the punishment)
and after the patch they don't appear at all.

I've asked Theodor to post more data and details about a
reproducible experiment.  We should start there.

I apologize in part for not being present in the beginning when
analysing these (one-off and uncommon) performance concerns  but I
don't think that's a reason for rushing a regression-inducing change.

João

They are not one-off and uncommon - there is no reason to be harsh and unkind. I glanced on the lsp-mode repo issues, and comments on file-truepath and it's performance killing slowness is abundant. I'll create a reproducible recipe later tonight.

Theo