Open ki827 opened 6 months ago
It's very had to help with minimal information. This could be issue with any of the modes including rust-mode
. Can you disable each of the modes and try to see which one is causing the issue ?
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 redisplay
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 ?
It's very had to help with minimal information. This could be issue with any of the modes including
rust-mode
. Can you disable each of the modes and try to see which one is causing the issue ?Also, once you have identified it - can you include the profiling report: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html
Here my profiler report.
176,743,961 80% + company-post-command
18,247,711 8% + command-execute
14,139,894 6% + jsonrpc--process-filter
6,596,763 3% + timer-event-handler
3,385,206 1% + redisplay_internal (C function)
261,952 0% + eldoc-pre-command-refresh-echo-area
177,992 0% + jit-lock--antiblink-post-command
10,560 0% + #<compiled 0x175deadf29cdd836>
8,980 0% + #<compiled -0x133aa427fdece4b1>
4,248 0% + eldoc-schedule-timer
2,112 0% + yas--post-command-handler
1,056 0% + undo-auto--add-boundary
252 0% + internal-default-process-filter
0 0% ...
6335 71% + timer-event-handler
1243 14% + ...
776 8% + command-execute
387 4% + jsonrpc--process-filter
41 0% + redisplay_internal (C function)
18 0% + eldoc-pre-command-refresh-echo-area
11 0% + company-post-command
1 0% + #<compiled -0x133aa427fdece4b1>
1 0% + jit-lock--antiblink-post-command
Thanks, did you try this:
This could be issue with any of the modes including rust-mode. Can you disable each of the modes and try to see which one is causing the issue ?
Thanks, did you try this:
This could be issue with any of the modes including rust-mode. Can you disable each of the modes and try to see which one is causing the issue ?
Mac os sonoma 14.6.1, Apple M1
Emacs 29.4, Homebrew
Minimal 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.
I found that if without company mode everything works well, but with the company it will be slow.
176,743,961 80% + company-post-command
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 found that if without company mode everything works well, but with the company it will be slow. 176,743,961 80% + company-post-command
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.
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.