ckoneru · 2022-05-20 23:49
I was working in a `python` project past few days and I noticed the completions are *really slow* . After running the `profiler`, `flyspell` was using around `50% cpu+mem` , `flycheck` was using `27% cpu+mem`.
Disabling `flyspell` improved things a lot.
I was wondering whether `flymake` uses less resources? Has anyone switched `flyspell` to `flymake` on LSP-mode? would like to get some inputs.
Thanks
JDRiverRun · 2022-05-21 02:17
Very likely it’s the lsp server being slow serving completions. You could try another like pyright.
mauguro_ · 2022-05-21 02:18
I didn't know there was a function to check memory/CPU usage on emacs :o
ckoneru · 2022-05-21 02:41
Yeah do `M-x profiler-start` and keep working as usual.
Run `M-x profiler-stop` after few minutes. Now run `M-x profiler-report` to see the report.
ckoneru · 2022-05-21 02:42
I am running pyright. As I mentioned in the post it was `flyspell` causing the issue.
d20frosted · 2022-05-21 09:34
I am a little bit confused. You mix spell checking (flespell) with syntax checking. Thought it's strange that it takes so much CPU. Are you using regular flyspell in prog mode or special prog flyspell?
7890yuiop · 2022-05-21 10:03
I'm confused about where lsp-mode fits into this question. Are those "really slow" completions being sourced from flyspell and flycheck results?? That sounds weird / not what I thought LSP was about.
ckoneru · 2022-05-21 12:48
So flyspell-prog-mode was enabled for all prog-modes
[deleted] · 2022-05-21 12:52
[deleted]
ckoneru · 2022-05-21 12:53
For whatever reason having flyspell enabled really slowed down things with Lsp completion.
from the profiler top users of cpu and memory are flyspell and flycheck.
ispinfx · 2022-05-23 00:49
lsp-ui does not work with flymake, so I have to use flycheck