jedi-vim: numpy, scipy, pandas all very slow (no python-mode here and seemingly no caching)
After doing import numpy or import pandas or import scipy package level completion numpy., 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:
base16-vim tabular vim-markdown vim-python-pep8-indent
jedi-vim vim-commentary vim-pathogen vim-shebang
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 10
- Comments: 17 (4 by maintainers)
@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). I use Python with numpy, scipy, and pandas to do my job of data analysis and processing (it’s my “free matlab” option — I am an electronic, analog-hardware, engineer), but I am not skilled enough to go deep inside — the linked issue, davidhalter/jedi#915, it’s way above my developer (meager) abilities. But if given detailed instruction I will try to help (test, etc.) in the measure I can; so yes, instead of
+1, I should have written this message. Thanks for helping in better communication.@Rmano Instead of
+1you might want to help out in a more productive way, e.g. by looking into why it is so slow…! After all (all of you) should be Python developers, right?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 <C-space> 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’) … Plug ‘davidhalter/jedi-vim’ Plug ‘lifepillar/vim-mucomplete’ call plug#end()
set completeopt+=longest,menuone,noinsert let g:mucomplete#enable_auto_at_startup = 1 let g:mucomplete#completion_delay = 300 let g:mucomplete#chains = { ‘python’: [‘path’, ‘keyn’]}
If that still doesn’t make it fast enough try the settings below, let g:pymode_rope = 0 let g:jedi#show_call_signatures = “0” let g:jedi#popup_on_dot = 0