GNU bug report logs - #75562
31.0.50; Stutters using eglot with lua-language-server

Previous Next

Package: emacs;

Reported by: the_wurfkreuz <the_wurfkreuz <at> proton.me>

Date: Tue, 14 Jan 2025 18:38:01 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75562 in the body.
You can then email your comments to 75562 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Tue, 14 Jan 2025 18:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to the_wurfkreuz <the_wurfkreuz <at> proton.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 Jan 2025 18:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 31.0.50; Stutters using eglot with lua-language-server
Date: Tue, 14 Jan 2025 18:37:05 +0000
[Message part 1 (text/plain, inline)]
I get stutters when i use eglot with the lua-language-server. It usually
happens when i use the 'newline' command.

Steps to reproduce:
1. emasc -Q
2. Open any lua file and enable lua-mode or lua-ts-mode (i tested on
neovim config files).
3. Enable eglot by executing 'eglot'.
4. Execute 'newline' by pressing <RET>.

This action should create an easily noticeable stutter.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.0) of 2025-01-02 built on wurfkreuz
Repository revision: 2f1052d9b0de551dc3a463ed54e21c63517497ab
Repository branch: master
System Description: Void Linux

Configured using:
'configure --with-native-compilation=aot --with-tree-sitter --with-gif
--with-png --with-jpeg --with-rsvg --with-tiff --with-imagemagick
-with-pgtk --with-mailutils CC=/usr/bin/gcc CXX=/usr/bin/gcc'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK
JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER XIM GTK3
ZLIB

Important settings:
value of $LC_COLLATE: C
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
windmove-mode: t
savehist-mode: t
meow-global-mode: t
meow-mode: t
meow-normal-mode: t
meow-esc-mode: t
eglot--managed-mode: t
flymake-mode: t
envrc-global-mode: t
envrc-mode: t
buffer-terminator-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
marginalia-mode: t
vertico-mode: t
corfu-popupinfo-mode: t
corfu-history-mode: t
corfu-echo-mode: t
global-corfu-mode: t
corfu-mode: t
which-key-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-treesit-auto-mode: t
winner-mode: t
global-auto-revert-mode: t
save-place-mode: t
electric-pair-mode: t
recentf-mode: t
global-display-line-numbers-mode: t
display-line-numbers-mode: t
override-global-mode: t
tooltip-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t

Load-path shadows:
/home/wurfkreuz/.emacs.d/elpa/transient-20250103.1731/transient hides /home/wurfkreuz/.source/emacs/lisp/transient

Features:
(shadow sort mail-extr emacsbug python wdired help-fns radix-tree
find-dired lua-ts-mode face-remap tramp-cmds windmove em-unix em-term
term disp-table ehelp em-script em-prompt em-pred em-ls em-hist em-glob
em-extpipe em-basic em-banner em-alias em-elecslash eshell vc-git
vc-dispatcher org-appear image-file image-converter oc-basic ol-eww eww
vtable mule-util url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range
ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb
ol-w3m ol-doi org-link-doi dired-aux savehist f em-tramp meow meow-tutor
meow-cheatsheet meow-cheatsheet-layout meow-core meow-shims meow-esc
meow-command array meow-thing meow-visual meow-keypad meow-beacon
meow-helpers meow-util color meow-keymap meow-face meow-var delsel
org-tempo tempo org-drill persist org-agenda embark-org org-element
org-persist org-id org-refile org-element-ast inline avl-tree org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint
org-pcomplete org-list org-footnote org-faces org-entities org-version
ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs
org-compat org-macs eglot external-completion jsonrpc ert ewoc debug
backtrace kdl-mode generic nix-mode nix-repl nix-shell nix-store nix-log
nix-instantiate nix-shebang nix-format nix yaml-mode haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support flymake-proc flymake dabbrev
haskell-customize dockerfile-mode sh-script executable terraform-mode
noutline outline hcl-mode lua-mode go-mode find-file etags fileloop xref
raku-mode raku-repl raku-imenu raku-indent smie raku-font-lock
raku-detect envrc inheritenv buffer-terminator transpose-frame
magit-bookmark magit-submodule magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff git-commit log-edit message sendmail yank-media puny rfc822
mml mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
magit-core magit-autorevert magit-margin magit-transient magit-process
magit-mode benchmark magit-git magit-base magit-section cursor-sensor
crm smerge-mode diff-mode track-changes hydra lv with-editor server
embark-consult embark ffap thingatpt consult bookmark marginalia vertico
project exec-path-from-shell fish-completion em-cmpl em-dirs esh-mode
esh-var esh-cmd esh-ext esh-proc esh-opt esh-io esh-arg esh-module
esh-module-loaddefs esh-util cape corfu-popupinfo corfu-history
corfu-echo corfu orderless tempel-collection tempel wgrep grep compile
text-property-search which-key docker docker-context docker-volume
docker-network docker-image docker-container docker-faces docker-core
docker-compose docker-process docker-utils tablist advice tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local find-func cedet dired dired-loaddefs tramp
trampver tramp-integration files-x tramp-message tramp-compat shell
pcomplete comint ansi-osc parse-time iso8601 time-date ansi-color
tramp-loaddefs docker-group transient pp format-spec edmacro kmacro
compat dash aio generator s avy goto-chg undo-tree diff queue c3-ts-mode
derived c-ts-common clojure-ts-mode treesit-auto treesit rose-pine-theme
midnight winner ring autorevert filenotify saveplace desktop frameset
elec-pair recentf tree-widget wid-edit comp comp-cstr warnings comp-run
comp-common display-line-numbers cl-extra help-mode use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
avy-autoloads buffer-terminator-autoloads cape-autoloads
clojure-ts-mode-autoloads corfu-autoloads docker-autoloads aio-autoloads
dockerfile-mode-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads envrc-autoloads exec-path-from-shell-autoloads
f-autoloads fish-completion-autoloads flymake-ansible-lint-autoloads
go-mode-autoloads goto-chg-autoloads haskell-mode-autoloads
hydra-autoloads inheritenv-autoloads lua-mode-autoloads lv-autoloads
magit-autoloads pcase marginalia-autoloads meow-autoloads
nix-mode-autoloads magit-section-autoloads orderless-autoloads
org-appear-autoloads org-drill-autoloads persist-autoloads
raku-mode-autoloads rx s-autoloads tablist-autoloads
tempel-collection-autoloads tempel-autoloads terraform-mode-autoloads
dash-autoloads hcl-mode-autoloads transient-autoloads
transpose-frame-autoloads treesit-auto-autoloads undo-tree-autoloads
queue-autoloads vertico-autoloads wgrep-autoloads info
with-editor-autoloads yaml-mode-autoloads package browse-url xdg url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process tty-child-frames
native-compile emacs)

Memory information:
((conses 16 919144 189934) (symbols 48 65951 36) (strings 32 266366 11146)
(string-bytes 1 8521506) (vectors 16 101905) (vector-slots 8 2165697 148305)
(floats 8 720 560) (intervals 56 12861 1951) (buffers 992 38))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Tue, 14 Jan 2025 20:35:03 GMT) Full text and rfc822 format available.

Message #8 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Tue, 14 Jan 2025 22:34:18 +0200
> Date: Tue, 14 Jan 2025 18:37:05 +0000
> From:  the_wurfkreuz via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> I get stutters when i use eglot with the lua-language-server. It usually
> happens when i use the 'newline' command.
> 
> Steps to reproduce:
> 1. emasc -Q
> 2. Open any lua file and enable lua-mode or lua-ts-mode (i tested on
> neovim config files).
> 3. Enable eglot by executing 'eglot'.
> 4. Execute 'newline' by pressing <RET>.
> 
> This action should create an easily noticeable stutter.

I think it would help if you run this several times after
"M-x profiler-start" and then present the profile by invoking
"M-x profiler-report".  The profile could give us hints regarding
the expensive processing in these cases.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Tue, 14 Jan 2025 22:25:01 GMT) Full text and rfc822 format available.

Message #11 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Tue, 14 Jan 2025 22:24:36 +0000
      5,921,875  70% + command-execute
      1,477,679  17% + timer-event-handler
        918,008  11% + redisplay_internal (C function)
         20,896   0% + jsonrpc--process-filter
          4,218   0%   Automatic GC
            144   0% + eldoc-schedule-timer
              0   0%   ...

         67  41% + command-execute
          41  25%   Automatic GC
          34  21% + redisplay_internal (C function)
          16   9% + timer-event-handler
           2   1% + ...
           1   0% + blink-cursor-end


Sent with Proton Mail secure email.

On Tuesday, January 14th, 2025 at 8:34 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Tue, 14 Jan 2025 18:37:05 +0000
> > From: the_wurfkreuz via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org
> > 
> > I get stutters when i use eglot with the lua-language-server. It usually
> > happens when i use the 'newline' command.
> > 
> > Steps to reproduce:
> > 1. emasc -Q
> > 2. Open any lua file and enable lua-mode or lua-ts-mode (i tested on
> > neovim config files).
> > 3. Enable eglot by executing 'eglot'.
> > 4. Execute 'newline' by pressing <RET>.
> > 
> > This action should create an easily noticeable stutter.
> 
> 
> I think it would help if you run this several times after
> "M-x profiler-start" and then present the profile by invoking
> "M-x profiler-report". The profile could give us hints regarding
> the expensive processing in these cases.
> 
> Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 15 Jan 2025 14:00:03 GMT) Full text and rfc822 format available.

Message #14 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 15 Jan 2025 15:58:56 +0200
> Date: Tue, 14 Jan 2025 22:24:36 +0000
> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
> Cc: 75562 <at> debbugs.gnu.org
> 
>       5,921,875  70% + command-execute
>       1,477,679  17% + timer-event-handler
>         918,008  11% + redisplay_internal (C function)
>          20,896   0% + jsonrpc--process-filter
>           4,218   0%   Automatic GC
>             144   0% + eldoc-schedule-timer
>               0   0%   ...
> 
>          67  41% + command-execute
>           41  25%   Automatic GC
>           34  21% + redisplay_internal (C function)
>           16   9% + timer-event-handler
>            2   1% + ...
>            1   0% + blink-cursor-end
> 

Thanks.  But please expand the profile fully (C-u RET on one of the
lines with "+"), because we need to see what takes the 70% this spends
in command-execute.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 15 Jan 2025 15:34:01 GMT) Full text and rfc822 format available.

Message #17 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 15 Jan 2025 15:33:19 +0000
      3,617,597  61% - command-execute
      3,502,577  59%  - funcall-interactively
      1,869,942  31%   - newline
      1,310,158  22%    - eglot--post-self-insert-hook
      1,310,158  22%     - eglot-format
      1,310,088  22%      - eglot--request
      1,276,403  21%       - jsonrpc-request
        904,685  15%        - accept-process-output
        107,445   1%         - timer-event-handler
        107,445   1%          - apply
        107,445   1%           - #<byte-code-function 16F>
         98,842   1%            - jsonrpc-connection-receive



On Wednesday, January 15th, 2025 at 1:58 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Tue, 14 Jan 2025 22:24:36 +0000
> > From: the_wurfkreuz the_wurfkreuz <at> proton.me
> > Cc: 75562 <at> debbugs.gnu.org
> > 
> > 5,921,875 70% + command-execute
> > 1,477,679 17% + timer-event-handler
> > 918,008 11% + redisplay_internal (C function)
> > 20,896 0% + jsonrpc--process-filter
> > 4,218 0% Automatic GC
> > 144 0% + eldoc-schedule-timer
> > 0 0% ...
> > 
> > 67 41% + command-execute
> > 41 25% Automatic GC
> > 34 21% + redisplay_internal (C function)
> > 16 9% + timer-event-handler
> > 2 1% + ...
> > 1 0% + blink-cursor-end
> 
> 
> Thanks. But please expand the profile fully (C-u RET on one of the
> lines with "+"), because we need to see what takes the 70% this spends
> in command-execute.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 15 Jan 2025 15:51:02 GMT) Full text and rfc822 format available.

Message #20 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 15 Jan 2025 17:50:27 +0200
> Date: Wed, 15 Jan 2025 15:33:19 +0000
> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
> Cc: 75562 <at> debbugs.gnu.org
> 
>       3,617,597  61% - command-execute
>       3,502,577  59%  - funcall-interactively
>       1,869,942  31%   - newline
>       1,310,158  22%    - eglot--post-self-insert-hook
>       1,310,158  22%     - eglot-format
>       1,310,088  22%      - eglot--request
>       1,276,403  21%       - jsonrpc-request
>         904,685  15%        - accept-process-output
>         107,445   1%         - timer-event-handler
>         107,445   1%          - apply
>         107,445   1%           - #<byte-code-function 16F>
>          98,842   1%            - jsonrpc-connection-receive

This was "mem" profile, right?  If so, try the "cpu" one instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 15 Jan 2025 16:49:01 GMT) Full text and rfc822 format available.

Message #23 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 15 Jan 2025 16:48:38 +0000
          72  51% - command-execute
          65  46%  - byte-code
          65  46%   - read-extended-command
          65  46%    - read-extended-command-1
          65  46%     - completing-read-default
          17  12%      - redisplay_internal (C function)
           1   0%       - window--adjust-process-windows
           1   0%        - window--process-window-list
           1   0%         - walk-windows
           1   0%          - #<byte-code-function 1CA>
           1   0%             process-live-p
           7   4%  - funcall-interactively
           6   4%   - newline
           2   1%    - electric-indent-post-self-insert-function
           2   1%     - indent-according-to-mode
           1   0%      - treesit-indent
           1   0%       - treesit--indent-1
           1   0%        - treesit-simple-indent
           1   0%         - treesit--simple-indent-eval
           1   0%          - #<byte-code-function AEB>
           1   0%           - #<byte-code-function A8A>
           1   0%              string-match
           1   0%    - #:newline-postproc
           1   0%       remove-hook
           1   0%    - eglot--post-self-insert-hook
           1   0%     - eglot-format
           1   0%      - eglot--request
           1   0%       - eglot--signal-textDocument/didChange
           1   0%        - eglot--track-changes-fetch
           1   0%           track-changes-fetch
           1   0%     execute-extended-command
          31  21% - redisplay_internal (C function)
           1   0%  - eval
           1   0%   - flymake--mode-line-exception
           1   0%    - flymake-disabled-backends
           1   0%     - called-interactively-p
           1   0%        backtrace-frame
           1   0%    file-remote-p
           1   0%  - jit-lock-function
           1   0%   - jit-lock-fontify-now
           1   0%    - jit-lock--run-functions
           1   0%     - #<byte-code-function EAC>
           1   0%      - font-lock-fontify-region
           1   0%       - font-lock-default-fontify-region
           1   0%        - font-lock-fontify-syntactically-region
           1   0%         - treesit-font-lock-fontify-region
           1   0%            treesit--font-lock-fontify-region-1
          30  21%   Automatic GC
           4   2% + ...
           4   2% + timer-event-handler


On Wednesday, January 15th, 2025 at 3:50 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Wed, 15 Jan 2025 15:33:19 +0000
> > From: the_wurfkreuz the_wurfkreuz <at> proton.me
> > Cc: 75562 <at> debbugs.gnu.org
> > 
> > 3,617,597 61% - command-execute
> > 3,502,577 59% - funcall-interactively
> > 1,869,942 31% - newline
> > 1,310,158 22% - eglot--post-self-insert-hook
> > 1,310,158 22% - eglot-format
> > 1,310,088 22% - eglot--request
> > 1,276,403 21% - jsonrpc-request
> > 904,685 15% - accept-process-output
> > 107,445 1% - timer-event-handler
> > 107,445 1% - apply
> > 107,445 1% - #<byte-code-function 16F>
> > 98,842 1% - jsonrpc-connection-receive
> 
> 
> This was "mem" profile, right? If so, try the "cpu" one instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 15 Jan 2025 19:31:01 GMT) Full text and rfc822 format available.

Message #26 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>,
 João Távora <joaotavora <at> gmail.com>
Cc: 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 15 Jan 2025 21:30:15 +0200
> Date: Wed, 15 Jan 2025 16:48:38 +0000
> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
> Cc: 75562 <at> debbugs.gnu.org
> 
>           72  51% - command-execute
>           65  46%  - byte-code
>           65  46%   - read-extended-command
>           65  46%    - read-extended-command-1
>           65  46%     - completing-read-default
>           17  12%      - redisplay_internal (C function)
>            1   0%       - window--adjust-process-windows
>            1   0%        - window--process-window-list
>            1   0%         - walk-windows
>            1   0%          - #<byte-code-function 1CA>
>            1   0%             process-live-p
>            7   4%  - funcall-interactively
>            6   4%   - newline
>            2   1%    - electric-indent-post-self-insert-function
>            2   1%     - indent-according-to-mode
>            1   0%      - treesit-indent
>            1   0%       - treesit--indent-1
>            1   0%        - treesit-simple-indent
>            1   0%         - treesit--simple-indent-eval
>            1   0%          - #<byte-code-function AEB>
>            1   0%           - #<byte-code-function A8A>
>            1   0%              string-match
>            1   0%    - #:newline-postproc
>            1   0%       remove-hook
>            1   0%    - eglot--post-self-insert-hook
>            1   0%     - eglot-format
>            1   0%      - eglot--request
>            1   0%       - eglot--signal-textDocument/didChange
>            1   0%        - eglot--track-changes-fetch
>            1   0%           track-changes-fetch
>            1   0%     execute-extended-command
>           31  21% - redisplay_internal (C function)
>            1   0%  - eval
>            1   0%   - flymake--mode-line-exception
>            1   0%    - flymake-disabled-backends
>            1   0%     - called-interactively-p
>            1   0%        backtrace-frame
>            1   0%    file-remote-p
>            1   0%  - jit-lock-function
>            1   0%   - jit-lock-fontify-now
>            1   0%    - jit-lock--run-functions
>            1   0%     - #<byte-code-function EAC>
>            1   0%      - font-lock-fontify-region
>            1   0%       - font-lock-default-fontify-region
>            1   0%        - font-lock-fontify-syntactically-region
>            1   0%         - treesit-font-lock-fontify-region
>            1   0%            treesit--font-lock-fontify-region-1
>           30  21%   Automatic GC
>            4   2% + ...
>            4   2% + timer-event-handler

Thanks.  This more or less clears Eglot, and instead points to
completing-read-default, redisplay, and GC.

João, any ideas or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Mon, 20 Jan 2025 11:06:01 GMT) Full text and rfc822 format available.

Message #29 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75562 <at> debbugs.gnu.org, the_wurfkreuz <the_wurfkreuz <at> proton.me>
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Mon, 20 Jan 2025 11:05:31 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Wed, 15 Jan 2025 16:48:38 +0000
>> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
>> Cc: 75562 <at> debbugs.gnu.org
>> 
>>           72  51% - command-execute
>>           65  46%  - byte-code
>>           65  46%   - read-extended-command
>>           65  46%    - read-extended-command-1
>>           65  46%     - completing-read-default
>>           17  12%      - redisplay_internal (C function)
>>            1   0%       - window--adjust-process-windows
>>            1   0%        - window--process-window-list
>>            1   0%         - walk-windows
>>            1   0%          - #<byte-code-function 1CA>
>>            1   0%             process-live-p
>>            7   4%  - funcall-interactively
>>            6   4%   - newline
>>            2   1%    - electric-indent-post-self-insert-function
>>            2   1%     - indent-according-to-mode
>>            1   0%      - treesit-indent
>>            1   0%       - treesit--indent-1
>>            1   0%        - treesit-simple-indent
>>            1   0%         - treesit--simple-indent-eval
>>            1   0%          - #<byte-code-function AEB>
>>            1   0%           - #<byte-code-function A8A>
>>            1   0%              string-match
>>            1   0%    - #:newline-postproc
>>            1   0%       remove-hook
>>            1   0%    - eglot--post-self-insert-hook
>>            1   0%     - eglot-format
>>            1   0%      - eglot--request
>>            1   0%       - eglot--signal-textDocument/didChange
>>            1   0%        - eglot--track-changes-fetch
>>            1   0%           track-changes-fetch
>>            1   0%     execute-extended-command
>>           31  21% - redisplay_internal (C function)
>>            1   0%  - eval
>>            1   0%   - flymake--mode-line-exception
>>            1   0%    - flymake-disabled-backends
>>            1   0%     - called-interactively-p
>>            1   0%        backtrace-frame
>>            1   0%    file-remote-p
>>            1   0%  - jit-lock-function
>>            1   0%   - jit-lock-fontify-now
>>            1   0%    - jit-lock--run-functions
>>            1   0%     - #<byte-code-function EAC>
>>            1   0%      - font-lock-fontify-region
>>            1   0%       - font-lock-default-fontify-region
>>            1   0%        - font-lock-fontify-syntactically-region
>>            1   0%         - treesit-font-lock-fontify-region
>>            1   0%            treesit--font-lock-fontify-region-1
>>           30  21%   Automatic GC
>>            4   2% + ...
>>            4   2% + timer-event-handler
>
> Thanks.  This more or less clears Eglot, and instead points to
> completing-read-default, redisplay, and GC.
>
> João, any ideas or suggestions?

I couldn't tell from the profile in the email, only after seeing the mem
profiles.  Now I've read the thread and understand this happens when you
type a newline.  Well, this is expected if you have the

   :documentOnTypeFormattingProvider

capability enabled and you have a slow-to-respond language server.
Eglot will wait for the server to process the inserted character and
send back an edit that reformats the buffers.  This wait is synchronous
(there is no way to make it asynchronous).

To remove this behaviour, just put

   :documentOnTypeFormattingProvider

in eglot-ignored-server-capabilities (via custom or Elisp, see its
docstring).

I've been pondering changing the variable's default value to have that
capability ignored by default.  I just don't do it because it sort of
clashes with the reasonably consistent policy that Eglot enables as much
of LSP as it can by default.  But I feel this LSP feature is a bit too
laggy to be on by default.  Although it generally works OK if you have a
fast server.  Opinions on this are welcome.

The fact that there's a sync wait on an IPC object also probably
explains why this doesn't show up in the CPU profile.

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Wed, 22 Jan 2025 12:31:01 GMT) Full text and rfc822 format available.

Message #32 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Wed, 22 Jan 2025 12:30:09 +0000
Yes, that helped.

On Monday, January 20th, 2025 at 11:05 AM, João Távora <joaotavora <at> gmail.com> wrote:

> Eli Zaretskii eliz <at> gnu.org writes:
> 
> > > Date: Wed, 15 Jan 2025 16:48:38 +0000
> > > From: the_wurfkreuz the_wurfkreuz <at> proton.me
> > > Cc: 75562 <at> debbugs.gnu.org
> > > 
> > > 72 51% - command-execute
> > > 65 46% - byte-code
> > > 65 46% - read-extended-command
> > > 65 46% - read-extended-command-1
> > > 65 46% - completing-read-default
> > > 17 12% - redisplay_internal (C function)
> > > 1 0% - window--adjust-process-windows
> > > 1 0% - window--process-window-list
> > > 1 0% - walk-windows
> > > 1 0% - #<byte-code-function 1CA>
> > > 1 0% process-live-p
> > > 7 4% - funcall-interactively
> > > 6 4% - newline
> > > 2 1% - electric-indent-post-self-insert-function
> > > 2 1% - indent-according-to-mode
> > > 1 0% - treesit-indent
> > > 1 0% - treesit--indent-1
> > > 1 0% - treesit-simple-indent
> > > 1 0% - treesit--simple-indent-eval
> > > 1 0% - #<byte-code-function AEB>
> > > 1 0% - #<byte-code-function A8A>
> > > 1 0% string-match
> > > 1 0% - #:newline-postproc
> > > 1 0% remove-hook
> > > 1 0% - eglot--post-self-insert-hook
> > > 1 0% - eglot-format
> > > 1 0% - eglot--request
> > > 1 0% - eglot--signal-textDocument/didChange
> > > 1 0% - eglot--track-changes-fetch
> > > 1 0% track-changes-fetch
> > > 1 0% execute-extended-command
> > > 31 21% - redisplay_internal (C function)
> > > 1 0% - eval
> > > 1 0% - flymake--mode-line-exception
> > > 1 0% - flymake-disabled-backends
> > > 1 0% - called-interactively-p
> > > 1 0% backtrace-frame
> > > 1 0% file-remote-p
> > > 1 0% - jit-lock-function
> > > 1 0% - jit-lock-fontify-now
> > > 1 0% - jit-lock--run-functions
> > > 1 0% - #<byte-code-function EAC>
> > > 1 0% - font-lock-fontify-region
> > > 1 0% - font-lock-default-fontify-region
> > > 1 0% - font-lock-fontify-syntactically-region
> > > 1 0% - treesit-font-lock-fontify-region
> > > 1 0% treesit--font-lock-fontify-region-1
> > > 30 21% Automatic GC
> > > 4 2% + ...
> > > 4 2% + timer-event-handler
> > 
> > Thanks. This more or less clears Eglot, and instead points to
> > completing-read-default, redisplay, and GC.
> > 
> > João, any ideas or suggestions?
> 
> 
> I couldn't tell from the profile in the email, only after seeing the mem
> profiles. Now I've read the thread and understand this happens when you
> type a newline. Well, this is expected if you have the
> 
> :documentOnTypeFormattingProvider
> 
> capability enabled and you have a slow-to-respond language server.
> Eglot will wait for the server to process the inserted character and
> send back an edit that reformats the buffers. This wait is synchronous
> (there is no way to make it asynchronous).
> 
> To remove this behaviour, just put
> 
> :documentOnTypeFormattingProvider
> 
> in eglot-ignored-server-capabilities (via custom or Elisp, see its
> docstring).
> 
> I've been pondering changing the variable's default value to have that
> capability ignored by default. I just don't do it because it sort of
> clashes with the reasonably consistent policy that Eglot enables as much
> of LSP as it can by default. But I feel this LSP feature is a bit too
> laggy to be on by default. Although it generally works OK if you have a
> fast server. Opinions on this are welcome.
> 
> The fact that there's a sync wait on an IPC object also probably
> explains why this doesn't show up in the CPU profile.
> 
> João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75562; Package emacs. (Sat, 08 Feb 2025 09:19:01 GMT) Full text and rfc822 format available.

Message #35 received at 75562 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <the_wurfkreuz <at> proton.me>
Cc: joaotavora <at> gmail.com, 75562 <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Sat, 08 Feb 2025 11:18:29 +0200
> Date: Wed, 22 Jan 2025 12:30:09 +0000
> From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 75562 <at> debbugs.gnu.org
> 
> Yes, that helped.

So can we close this bug, or is there something else to be done here?




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 22 Feb 2025 09:22:02 GMT) Full text and rfc822 format available.

Notification sent to the_wurfkreuz <the_wurfkreuz <at> proton.me>:
bug acknowledged by developer. (Sat, 22 Feb 2025 09:22:02 GMT) Full text and rfc822 format available.

Message #40 received at 75562-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: the_wurfkreuz <at> proton.me, joaotavora <at> gmail.com
Cc: 75562-done <at> debbugs.gnu.org
Subject: Re: bug#75562: 31.0.50; Stutters using eglot with lua-language-server
Date: Sat, 22 Feb 2025 11:21:30 +0200
> Cc: joaotavora <at> gmail.com, 75562 <at> debbugs.gnu.org
> Date: Sat, 08 Feb 2025 11:18:29 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Wed, 22 Jan 2025 12:30:09 +0000
> > From: the_wurfkreuz <the_wurfkreuz <at> proton.me>
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 75562 <at> debbugs.gnu.org
> > 
> > Yes, that helped.
> 
> So can we close this bug, or is there something else to be done here?

No further comments within 2 weeks, so I'm now closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 22 Mar 2025 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 103 days ago.

Previous Next


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