Hi, I’ve been trying to debug a performance issue I am facing when
(layout +bepo) is enabled.
The problem, is that Emacs is being really sluggish in some area when using this
module. Specifically, while using
which-key or prompting
M-x takes a few seconds,
where it is instantaneous (besides the normal idle-delay for which-key) in
My really poor attempt at debugging this issue, led me to believe
is causing the issue.
I ran multiple
doom/toggle-profiler, the difference between vanilla and with
(layout +bepo) enabled is that Emacs seems to call
evil-after-load often, which
in turns, loads multiple instance of
doom-snippets-initialize. Here’s the relevant part of the profiler:
1264 50% - which-key–propertize-description 1215 48% - byte-code 1209 48% - eval-after-load 306 12% - #<compiled 0x1f40096f955d> 306 12% + doom-snippets-initialize 302 12% - #<compiled 0x1f40096f955d> 302 12% + doom-snippets-initialize 302 12% + #<compiled 0x1f40096f955d> 299 11% + #<compiled 0x1f40096f955d>
Unfortunately, this is where my knowledge on debugging issue ends. I feel that
I’ve found what’s responsible for my poor performance, but not the underlying problem.
Why is there a call to
eval-after-load when using
(layout +bepo), but not in
The complete profiler output with vanilla Doom Emacs and
(layout +bepo) enabled:
SPC h… (wait for which-key menu to appear)
T, which run
and the same test sequence without
Maybe @gagbo might have an idea? (I know you’re not really using bépo anymore, so sorry for the ping)
I also know that Doom is undergoing a massive refactor and the issue might take some time to get resolved, in the meantime, I’ll try to see if I can live without doom-snippets or without the bépo module.
What did you expect to happen?
Similar performance to the vanilla Doom Emacs experience.
Steps to reproduce
- enable the layout module with +bepo flag in init.el (layout +bepo)
- try to prompt a which-key entry (SPC h) or M-x
- observe abnormal delays to show the which-key menu or M-x prompt
This is my current doom/info, profilers were run with vanilla Doom Emacs, though.
Loading data dump...