From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Newsgroups: gmane.emacs.bugs Subject: bug#60107: 30.0.50; Open new files very slow if eglot and which-function-mode are enabled. Date: Fri, 16 Dec 2022 00:59:28 +0100 Message-ID: <87pmcki50f.fsf@web.de> References: <87edt0mg7p.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1381"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: 60107@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 16 01:13:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5yLk-0000DK-BA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Dec 2022 01:13:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5yLZ-0007Dw-Qy; Thu, 15 Dec 2022 19:13:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5yLX-0007DV-Sz for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 19:13:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5yLW-0004CJ-DU for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 19:13:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5yLV-0005ot-Qv for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 19:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Felix Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Dec 2022 00:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60107 X-GNU-PR-Package: emacs Original-Received: via spool by 60107-submit@debbugs.gnu.org id=B60107.167114953222360 (code B ref 60107); Fri, 16 Dec 2022 00:13:01 +0000 Original-Received: (at 60107) by debbugs.gnu.org; 16 Dec 2022 00:12:12 +0000 Original-Received: from localhost ([127.0.0.1]:45749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5yKi-0005oa-6o for submit@debbugs.gnu.org; Thu, 15 Dec 2022 19:12:12 -0500 Original-Received: from mout.web.de ([212.227.17.11]:46197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5yKd-0005oH-3a for 60107@debbugs.gnu.org; Thu, 15 Dec 2022 19:12:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1671149520; bh=iYCPWipHdSWCkKS34dFA7z/iP8sGu5sRzNSqM7wPF3Y=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=om5pqPNOyg9YkMsbcUdeJQspMULxyou9UJBfR3gQ8h2lL/U8AnTjfdvQgDsslnFkv ypTTxxbPXvYT10R+adv1oUJPCMWpsrbdljvjTqH0sersVXGkhKUzIvHbNsVGbUGsKV 3EVnnCjfCY2RogIqO5aA2oI+80JtLm2XQjNmoLyW4OfwAvN2ovlUTPqidVWHP1MLOq Wjv81BQH7HsYDCwAfpHkTIqFsZGNikxRkaFjvUrb9dyDy5tdgxOCr8FgjUHhAaQAq5 XGSB79aeGr6bBesEBW+3X1skjYHTeY0o4rmtvJfLmTpIoGl7kG/zEhIluo3nCsMp5z HzSqx/8L7I4Yw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from felix-lifebooka531.web.de ([94.134.181.142]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MgzeZ-1oQqcP1wmT-00h0Kc; Fri, 16 Dec 2022 01:12:00 +0100 In-reply-to: X-Provags-ID: V03:K1:8ijaOJCjOtqXyjuSFk6Jod34/uja68Nw3KojybtxlYUnh3NQkvM 1i0T+DNPDoXKNEqVcMbJiKCksMLt1d3sHcJpEqWWe6fkO9N3J/XP92QwwI76CAfD8ZOKyay R8bMvJgsv/apuhv0GFMVsdsCRxw8oW8pHwaa8xU61fq2EissQpyUd2DtYcdIVB5vb6pTisE qwRTIToKiKP1DCIW0XYfQ== UI-OutboundReport: notjunk:1;M01:P0:aBxTzjxZuWQ=;gp029Eax/w+/Z3oB9Kg5R8+6vsM jMQ05HO/LXuIkq+WM4hAqgdftXFjeQxLxinQY6MuojShGKZbcTl4zdFM2pePci3j9GlaweUiO 6F5GUPYoEPj2pe6AblQy1eK75kCUNBX53c98/d9E1TIQ1ERLFCjCjrbQLTNLZZFTX/dzAuIwg EFit7axQu1rOfPPiWV1H9BKwfPT9gNLD07KW2Wos3oPBdPgn/y0nyAtEN+IvhmrdHQuYD7X4q RaQO/Rf72ZMO7CNgmV0Rpes74AUGBJU8VhyBsVyIhKxnoWJzsuQdwh/0L81sLVi4BdMVSdfmJ DffG/UvAK6/a8mHUtCZUDwnD8g8wxgJpvqMhKllCm65wC3X/frXllPLsJ5rRztEOwLW6+1d+n tTybjjg+dPpABuw501qdiHGzjvgFLraeunehVJkIVi/I30YE8RQNb1pCQs2NYWL+XOQGhetzP mnKIuyy1sTBNBfBwISswidT92FG6d+9hFJWeaRZhlDcp5c+X2F8HoMzGRal4H2l3xfXd8v+1v 0QmGZVN+oA3ciO9pHPK/YCwSLoT2DWwwxCWyMwiUYrAJma2Sf9FcGeLF2L256QjLv+IVL5QkH AFW8ohuhCYk3S6utv4utELkDsyHZa/doch+/6rn+OwQ1kI19tQbQA0Kj24xdxkDs+ZiouCmcI Svyt07S8r99LiGUz/sVeYrnuOzwkE1PceQGLh5Z0KZi+/UJmU50yNcYutkZGJlNJoQ7SVnKp9 u01e2hP3xopf6oGkjTtBiQzwggk1vyPSA4SZho3qljfk/rh8IY7eVNa7SwS9qgcL1VKRY13U X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251161 Archived-At: Hallo Jo=C3=A3o, Thanks for the fast response! 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. If this is not a bug of emacs, feel free to close this bug report. Btw. thanks a lot for eglot! Felix Jo=C3=A3o T=C3=A1vora writes: > Hi Felix, > > First of all, thanks for the easy-to-follow Emacs -Q reproduction > recipe. I reproduced the problem, although in my own test, which > used medium/small C++ files, the delay I noticed wasn't very long, > about 1 second. > > Which-function-mode relies on Imenu, which is the keeper of > a syntactic sub-tree of the file, which it must collect from somewhere. > When Eglot is enabled, Imenu gets its tree from the LSP server. > Depending on the LSP server and the amount of information at > hand, this can be a lot of information and take some time to gather. > > It seems which-function-mode not only relies on Imenu but also > blocks the user interface and redisplay while it is waiting for the > Imenu backend to reply (the Imenu backend in this case being > Eglot's). > > I don't see a good fix for this, except disabling Imenu/Eglot integration > by adding the symbol 'imenu to eglot-stay-out-of (see the Eglot > manual). > > It can also be that what's slowing down operation here isn't the > collection of the syntax tree per se but the logging that is going > on. See also the Eglot manual for how to configure > eglot-events-buffer-size to see if it makes a difference or not.; > > Finally, you can probably get some other source for Imenu information > to feed which-func-mode. The new C++ modes like c++-ts-mode seems > to have similar information handy, and perhaps it takes a lot less time > to compute. > > Jo=C3=A3o > > On Thu, Dec 15, 2022 at 10:57 PM Felix wrote: > > In GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version > 3.24.35) of 2022-12-15 built on felix-lifebooka531 > Repository revision: 0d60579b6b6f2648a881572783322b1bcf931a73 > Repository branch: makepkg > Windowing system distributor 'The X.Org Foundation', version 11.0.122010= 06 > System Description: Arch Linux > > Configured using: > 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib > --localstatedir=3D/var --mandir=3D/usr/share/man --with-gameuser=3D:gam= es > --with-modules --without-libotf --without-m17n-flt --without-gconf > --enable-autodepend --with-native-compilation=3Dyes --with-xinput2 > --with-x-toolkit=3Dgtk3 --without-xaw3d --without-cairo --with-sound=3D= no > --with-xwidgets --with-tree-sitter --without-gpm > --without-compress-install > '--program-transform-name=3Ds/\([ec]tags\)/\1.emacs/' > 'CFLAGS=3D-march=3Dnative -mtune=3Dgeneric -O3 -pipe -fno-plt -fexcepti= ons > -Wp,-D_FORTIFY_SOURCE=3D2 -Wformat -Werror=3Dformat-security > -fstack-clash-protection -fcf-protection' > LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' > > Configured features: > ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 > LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG > SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 > XDBE XFT XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB > > Important settings: > value of $LANG: de_DE.UTF-8 > locale-coding-system: utf-8 > > Opening C files is very slow if which-function-mode and eglot are > enabled at the same time. I tested this with: > > emacs -Q > opening a C project file > M-x eglot > M-x which-function-mode > switching to another .c project file now takes seconds until the buffer > shows up. > I use an old Laptop, but with just one of the two modes disabled, > it's quite snappy.