emacs-lsp / lsp-python-ms

lsp-mode :heart: Microsoft's python language server
https://emacs-lsp.github.io/lsp-python-ms
BSD 3-Clause "New" or "Revised" License
189 stars 41 forks source link

Documentation and completions slow to appear after startup #57

Open r-zip opened 5 years ago

r-zip commented 5 years ago

FYI, I have had this problem with Emacs 26.2, Emacs 26.3, and Emacs 27.0.50 built with jansson.

After the language server has started, documentation and completion candidates are slow to appear, and I get lots of "task cancelled" messages.

By contrast, VSCode is quick to provide completions and documentation after startup.

Since we know that the VSCode and Emacs servers are the same, do we know what difference between the clients is causing this issue?

yyoncho commented 5 years ago

@r-zip I have investigated that in the past. Task cancelled is received if there are changes in the files that the language server is scanning right now. In that particular case the issue was caused by the emacs backup files.

r-zip commented 5 years ago

@yyoncho I just disabled backups completely and set create-lockfiles to nil. Still having the issue. Do you have any other recommendations?

yyoncho commented 5 years ago

@r-zip I debugged it in the past by recompiling the csharp langauge server with additional logging. If you can provide a project to reproduce the issue with(ideally using the docker image - you may use https://github.com/emacs-lsp/lsp-docker ) I could take a look. Without a reproducer, it will be really hard to do anything on our side.

seagle0128 commented 5 years ago

mspyls takes long time to index and cache at the first startup, then it's faster. I observed the same behaviors in VSCode.