ncm2 / ncm2-jedi

MIT License
23 stars 11 forks source link

Starts many jedi jobs and high memory usage over time #10

Closed xiamaz closed 5 years ago

xiamaz commented 6 years ago

ncm2-jedi uses large amounts of memory (1-2GB) after getting new completions on python files.

Usage description

I observe this behavior with completion on a script using matplotlib, pandas, numpy. The used amount of memory increases with receiving more completions and will remain static if no completions are obtained.

Observations

A large number of ncm2_jedi and jedi jobs are visible in htop, all of them started by same ncm2_jedi parent job.

System setup

Archlinux with python 3.7.0, python-jedi 0.13.1-1, neovim 0.3.1-1, python-neovim 0.2.6-2.

Minimal vimrc for reproduction

call plug#begin()
"" Neovim configuration
function! DoRemote(arg)
        UpdateRemotePlugins
endfunction
" Autocompletion
Plug 'roxma/nvim-yarp'  " nvim framework
Plug 'ncm2/ncm2'
"" NCM Completion sources
Plug 'ncm2/ncm2-jedi', {'for': 'python'}
call plug#end()

" ncm2 completion manager settings
" enable ncm2 for all buffers
autocmd BufEnter * call ncm2#enable_for_buffer()
" IMPORTANTE: :help Ncm2PopupOpen for more information
set completeopt=noinsert,menuone,noselect
set shortmess+=c  " hide some messages
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
Helvethor commented 6 years ago

I observe the same behaviour. Regularly closing vim helps but it is clearly annoying.

roxma commented 5 years ago

duplicated #1