Subject: Re: bug#60107: 30.0.50; Open new files very slow if eglot and which-function-mode are enabled.

From: Eli Zaretskii <[email-masked]>
Date: Fri, 16 Dec 2022 09:23:02 +0200

> Cc: [email-masked]
> From: Felix <[email-masked]>
> Date: Fri, 16 Dec 2022 00:59:28 +0100
> 
> Now it makes sense that glsl-mode managed with eglot and glslls takes
> forever to open glsl files, and imenu is not working at all.
> Seems to depend on the server.
> I will try your suggestions, in the end which-function-mode
> is not that important to me, so if everything fails it's not that bad
> either.

Does it help to customize which-func-non-auto-modes to add the major
mode you are using there?  Or maybe customize which-func-maxout to a
small value to get the same effect in any mode?  I'm asking whether
this helps because it's unclear to me whether doing so will avoid
blocking redisplay, if and when which-func finally becomes active.

> If this is not a bug of emacs,
> feel free to close this bug report.

If the above doesn't help, I guess some changes to which-func could be
in order, to avoid blocking the first display of a buffer for such a
long time.  So in that case we shouldn't close this bug report yet.

Thanks.