When editing .el
files my Emacs is very slow. The larger the file, the worse it behaves, it is especially visible while scrolling or using autocompletion of any kind. It becomes pretty visibly slow at +60 LOC. What's interesting, it only happens Emacs-Lisp mode, I also use Emacs to write Ruby, Elixir and Rust code and those behave just fine.
I went through with disabling the usual suspects, such as Flycheck
, Flyspell
and Company
, but it did not improve a lot. Profiling also did not reveal any abnormal CPU or memory usage. I am using version 25.3 installed through hombrew.
Are there any less obvious things that might be causing this behavior?
Just in case, the list of minor modes for Emacs-Lisp
mode are:
Enabled minor modes: Async-Bytecomp-Package Auto-Composition
Auto-Compression Auto-Encryption Auto-Revert Blink-Cursor
Column-Enforce Column-Number Company Completion-In-Region
Delete-Selection Diff-Auto-Refine Diff-Hl Diff-Hl-Flydiff
Diff-Hl-Margin Diff-Hl-Margin Display-Time Electric-Indent
Electric-Pair Evil Evil-Leader Evil-Local File-Name-Shadow Flycheck
Flyspell Font-Lock Global-Diff-Hl Global-Eldoc Global-Font-Lock
Global-Git-Commit Global-Linum Global-Undo-Tree Line-Number Linum
Magit-Auto-Revert Mouse-Wheel Projectile Purpose Rainbow
Rainbow-Delimiters Shell-Dirtrack Tooltip Transient-Mark Undo-Tree
Whitespace Yas Yas-Global
It is not particularly different from the one I am running for Elixir
mode, yet Emacs-Lisp
is considerably slower:
Enabled minor modes: Alchemist Async-Bytecomp-Package Auto-Composition
Auto-Compression Auto-Encryption Auto-Revert Blink-Cursor
Column-Enforce Column-Number Company Completion-In-Region
Delete-Selection Diff-Auto-Refine Diff-Hl Diff-Hl-Flydiff
Diff-Hl-Margin Diff-Hl-Margin Display-Time Electric-Indent
Electric-Pair Evil Evil-Leader Evil-Local File-Name-Shadow Flyspell
Font-Lock Global-Diff-Hl Global-Eldoc Global-Font-Lock
Global-Git-Commit Global-Linum Global-Undo-Tree Line-Number Linum
Magit-Auto-Revert Mouse-Wheel Projectile Purpose Rainbow
Rainbow-Delimiters Ruby-End Shell-Dirtrack Tooltip Transient-Mark
Undo-Tree Whitespace Yas Yas-Global