Open ANtlord opened 4 years ago
Thanks for your interest in palantir/python-language-server, @ANtlord! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.
You need to sign a two page long license agreement full of corporate gibberish just to make a PR? bruh... Can I find somewhere an explanation or a statement why this is necessary? I thought pyls is MIT Licensed.
Huge improvement for large projects. I hope a PR with better defaults (without docs & labels) as suggested will get merged soon.
Pull request for https://github.com/palantir/python-language-server/issues/823
I've done a little investigation so I can say that
Completion.get_signatures()
andCompletion.docstring()
slow down performance about 5 times. The results of the functions are not seen in completions for NeoVim/Vim at least so calling the functions is overhead for the case.I dump time ranges in files /tmp/pyls_completions.prof for
pyls_completions
method and/tmp/PythonLanguageServer.completions.prof
forcompletions
method ofPythonLanguageServer
class.Here are the results of the investigation:
The .fast reports are done with commit a0d32bb; the .slow reports are done with 21c484e.
The first one doesn't get signatures, documentation and labels for completions. Code in the latter commit differs from version from
develop
branch but does the same. As wrote the data is not required to get completions but it slows down performance 5 times after the first call. The first call is slower only 2 times because Jedi use sources instead of its internal cache. Tested script consists ofimport os; os.
.I don't have certain suggestions. The only idea I have is introducing new settings avoids getting documentation and pretty labels.