eglot extremely slow when doing xref-find-definitions on large fileI'm running Emacs 31.0.91 on mac…
انتشار: 2026/08/03 00:07 UTCدریافت: 2026/08/05 17:32 UTCآخرین مشاهده: 2026/08/05 17:32 UTC
eglot extremely slow when doing xref-find-definitions on large fileI'm running Emacs 31.0.91 on macOS 26.6.The file I'm viewing is [github.com/wolfSSL/wolfssl/blob/master/wo…(github.com/wolfSSL/wolfssl/blob/master/wo…)This file has 82095 lines of code and about 3.1M in size.When I do a `M-x xref-find-definitions` on a function, it takes 45 seconds or even longer to locate it. Once the first call is handled, the subsequent xref calls will go fine, even with a different function.I'm using clangd v21.0.0 and the same LSP works perfectly with my vim setup.For smaller sized files, it appears to be working reasonably fine. Is there anything I can tweak for this performance issue? My gc related configuration: ;; in early-init.el (setq gc-cons-threshold most-positive-fixnum) ;; in init.el (setopt gc-cons-threshold (* 48 1024 1024) gc-cons-percentage 0.2) (run-with-idle-timer 15 t #'garbage-collect)My eglot configuration is pretty straightforward: (use-package eglot :custom (eglot-code-action-indications '(eldoc-hint)) :hook ((c-ts-mode c++-ts-mode cmake-ts-mode go-ts-mode python-ts-mode) . eglot-ensure) (before-save . (lambda () (when (eglot-managed-p) (eglot-format-buffer)))))redd.it/1vdx80z@r_emacs