-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-mode on emacs 29 and above is very slowly #548
Comments
It's very had to help with minimal information. This could be issue with any of the modes including Also, once you have identified it - can you include the profiling report: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html |
I can confirm that this is an issue, and report the profiling data shortly. Based on my previous observations, there’s very frequent calls to |
Possibly related to #417 |
Does this also happen with enabling tree sitter: https://github.com/rust-lang/rust-mode?tab=readme-ov-file#tree-sitter ? |
Here my profiler report. MEM
CPU
|
Thanks, did you try this:
|
OSMac os sonoma 14.6.1, Apple M1 emacsEmacs 29.4, Homebrew configMinimal config to reproduce this problem. ;; Enable use-package (built-in for Emacs 29+)
(require 'use-package)
;; Optional: Enable use-package ensure by default
(setq use-package-always-ensure t)
;; Rust mode
(use-package rust-mode
:init (setq rust-format-on-save t))
;; Eglot for LSP features (built-in for Emacs 29+)
(use-package eglot
:hook (rust-mode . eglot-ensure)
:config
(add-to-list 'eglot-server-programs '(rust-mode . ("rust-analyzer"))))
(use-package company
:hook (rust-mode . company-mode)
:config
(setq company-idle-delay 0.1
company-minimum-prefix-length 1))
I found that if without company mode everything works well, but with the company it will be slow. |
It's clear that the company mode used up a lot of memory. 🤔 I'm using the older company mode in https://github.com/elp-revive/company-mode since there were some performance problems after this commit: company-mode/company-mode@b5db193. But I'm not sure if that is relevant to this issue. |
I have the same idea. But using company mode with other prog modes, such as go mode, c mode, etc., will not cause Emacs to run slowly. |
Yeah, you are right. Sorry, I wasn't thinking straight. 🫣 |
I clean my config and use
package-install
to install the ust-mode, company-mode. Active eglot-mode and company-mode, rust-mode, without additional configuration, I found that emacs slowly.The text was updated successfully, but these errors were encountered: