-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
numpy, scipy, pandas all very slow (no python-mode here and seemingly no caching) #703
Comments
No suggestion in #163 seems to apply here. |
+1 |
Maybe related to davidhalter/jedi#915. |
+1 |
@Rmano |
@blueyed --- I just wanted to add that I see the problem too. No, I am not a Python nor a Vim developer, unfortunately (I'd like). |
@Rmano It's actually not that easy to solve. I've tried to fix this before and it seems pretty hard. Do you have an SSD? Fairly new computer? |
OI Imagine it should be difficult. They are big libraries and probably the only way would be to have a kind of on-disk cache... with all the related keep-in-sync problem. I have an i5, normal HDD, 16g ram. It's about a 10 second delay. Thanks for the nice package, BTW! |
i5-4960k 4.6Ghz running off SSD https://asciinema.org/a/OEHrTdJ9Pnf7Kq4ZeXWskMVx9 Even makes my fans turn on :P. What can we provide to help? |
I found airline was slowing the autocomplete popup to a crawl (as well as hampering cursor movement). I knew it was a vim specific problem and not due to the size of scipy because the autocomplete popup was near instant in terminal ipython. So try commenting out all your questionable plugins in .vimrc and then restart vim. If the problem goes away, a plugin is the culprit, and you can figure out which through a process of elimination. |
I use almost no plugin and the few I use are extremely conventional: some highlighting, indentation, etc. Nevertheless I'm not experiencing too slow autocompletion for np, pd, etc. anymore. It's not super fast but it's ok if you open the completion menu on demand. |
Ah... and it's not super fast in ipython also. |
Ok. I think I'm closing, because the most serious issues have been fixed. There are still slow libraries, but numpy is probably fine. pandas is a bit of a bigger problem and tensorflow... Well that one is just really slow. I have ideas how to fix it. If you want to file an issue, please use the jedi issue tracker and not this one. |
Just confirming that autocomplete for those libraries load faster. Not insanely fast due to their size, but it's much faster then the video I linked above. |
I also had issues with those big libraries being slow to autocomplete. But for most autocompletes, vim's built in path and keyn completion methods work very well. So I set it up to just use path and keyn automatically as I type and then jedi doesn't activate unless I manually hit or type a dot. The https://github.com/lifepillar/vim-mucomplete plugin helped me set this up. Here is the code I had to put in my vimrc. call plug#begin('~/.vim/plugged') set completeopt+=longest,menuone,noinsert If that still doesn't make it fast enough try the settings below, |
The problem with vim's builtin library is that it just randomly executes code. It might not be what you want. (That's also how it's fast). |
I know iPython and jupyter lab completion works that way but the built in methods I'm using are very simple and don't execute Python code. I'm using Path and keyn. Path looks for paths on your filesystem. keyn looks for keywords in the file. I still rely on jedi vim for autocompleting anything that isn't already used or defined in my current buffer. |
After doing
import numpy
orimport pandas
orimport scipy
package level completionnumpy.
,pandas.
,scipy.
takes several seconds (up to more than 20 seconds for pandas). Successive completions take the same time, so maybe the cache is not working. I'm not using python-mode, my bundles are:The text was updated successfully, but these errors were encountered: