Closed raxod502 closed 4 years ago
The profiler log suggests that you have lsp-print-io
set to t. The client/server logging itself is very slow so the time is mostly spent in logging. Can you upload a performance profile with logging turned off?
Thanks -- will reopen when I reproduce with logging disabled.
Describe the bug I experience momentary freezes of up to one second while typing in
web-mode
using thets-ls
language server, with Flycheck and Company enabled. Keystrokes are not dropped; their insertion is just delayed.Here is a video of the behavior (note: moved from Google Drive to Nextcloud), also viewable below:
To Reproduce Unfortunately, I have not been able to reproduce the behavior starting from a plain Emacs, so it is may be a conflict with something in my configuration. Furthermore, I can't reproduce it directly after a restart of Emacs, so it is likely the result of some state building up over time and causing a performance problem. Disabling Company removes the latency in the problematic session, but enabling Company in another session does not introduce the problem, so it's clearly not just Company.
Do you have any suggestions about what might be the bottleneck? If so, I could investigate further on my end next time the slowness reproduces. Perhaps it happens when I get a lot of language servers running (I have eight in the session which exhibits the problem, among texlab, bash-ls, clangd, hie, and ts-ls) or when there are many buffers handled by LSP (nineteen in this case).
Expected behavior Typing should not have noticeable latency.
Which Language Server did you use ts-ls
OS Manjaro Linux
Error callstack
Here is a selection of some of the slower performance diagnostics generated by enabling
lsp-print-performance
:Here are the messages sent back and forth to ts-ls.
Here is my main
*lsp-log*
.Here is the call stack from
M-x profiler-*
.