Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request for #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.