ncm2-jedi
ncm2-jedi copied to clipboard
Possible speed up option by disabling type information
Hi there,
First, thanks for this awesome autocomplete plugin!
You may know that jedi can be quit slow for big libraries (e.g. see #4). However retrieving the completions is actually quite fast, but requesting the types/description of those is slow (davidhalter/jedi#1116).
Completion can be sped up by seconds by changing the lines requesting the type/description. In particular: https://github.com/ncm2/ncm2-jedi/blob/0418d5ca8d4fe6996500eb04517a946f7de83d34/pythonx/ncm2_jedi.py#L83 https://github.com/ncm2/ncm2-jedi/blob/0418d5ca8d4fe6996500eb04517a946f7de83d34/pythonx/ncm2_jedi.py#L94
I think this will break snippet support (I do not know since I do not use it)
E.g. this change makes initial completion of tensorflow go from 8 seconds to 1-2 seconds on my machine.
Maybe it is nice to add a 'speed' option. I could give it a go and create a pull request if you like?
PS: if you use my hacky fork of jedi, variable name completion becomes nearly instant: https://github.com/HansPinckaers/jedi
Thanks again, Hans
I'll work on this after https://github.com/ncm2/ncm2/issues/67 . This is also related to https://github.com/ncm2/ncm2/issues/18
It should be done after snippet interface stabilization
I'm still short of time, there's no ETA.