Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

Having dictionary set appears to make neocomplcache unusably slow #389

Closed Julian closed 11 years ago

Julian commented 11 years ago

Hi, sorry, searched around a bit for this and didn't find anything mentioning it, apologies if it has been mentioned somewhere.

I have 'dictionary' set, and when it is, inserting a character takes on the order of 25 seconds with neocomplcache enabled. set dictionary= gets me back to normal, but I don't see a way to disable dictionary completion, or why it should take that long even with it enabled.

Sending ^C to vim shows that neocomplcache is running get_keyword_list if that helps.

Also

⊙  wc -l /usr/share/dict/words                                                                                                                                                                   Julian@Air
235886 /usr/share/dict/words
(rtb)
Shougo commented 11 years ago

Sorry, I fixed for it.

Julian commented 11 years ago

No need to apologize thanks for a great plugin :)

I'll keep an eye out for the fix.

Shougo commented 11 years ago

I'll keep an eye out for the fix.

Is it fixed the problem?

Julian commented 11 years ago

Sorry, didn't know you really meant it should be fixed already, I updated and it didn't appear to be, it still takes the same amount of time. This is with an empty vimrc with just neocomplcache and set dictionary+=/usr/share/dict/words.

Shougo commented 11 years ago

Sorry, I did not push for it. I updated neocomplcache.

Julian commented 11 years ago

Ah :D.

Tried updating, still takes a long time, though now it appears to also fail if I leave it for long enough:

Error detected while processing function neocomplcache#complete#auto_complete..neocomplcache#complete#manual_complete..neocomplcache#complete#_get_words:
line   11:
E686: Argument of sort() must be a List
Press ENTER or type command to continue
Error detected while processing function neocomplcache#complete#auto_complete..neocomplcache#complete#manual_complete..neocomplcache#complete#_get_words:
line   11:
E714: List required
Press ENTER or type command to continue
Shougo commented 11 years ago

Please upload your minimal .vimrc and representation ways. I will check it.

Julian commented 11 years ago

vimrc is just:

set nocompatible
filetype off
set runtimepath+=~/.vim/bundle/vundle/
call vundle#rc()

" Let Vundle manage Vundle (required!).
Bundle 'gmarik/vundle'

Bundle 'Shougo/neocomplcache'

if filereadable("/usr/share/dict/words")
    set dictionary+=/usr/share/dict/words
endif

let g:neocomplcache_enable_at_startup = 1

I actually don't even care about dict completion too much, though it'd be nice for a few filetypes. What's the easiest way to just disable it?

Shougo commented 11 years ago

Please update neocomplcache again. I tested your .vimrc but the problem was not happened.

Shougo commented 11 years ago

I actually don't even care about dict completion too much, though it'd be nice for a few filetypes. What's the easiest way to just disable it?

You should use g:neocomplcache_dictionary_filetype_lists variable instead of dictionary option.

Julian commented 11 years ago

Well, I don't use dictionary for neocomplcache. I've had it set for years, and use it for spell.

Updating neocomplcache again still doesn't seem like it's fixed it for me. let g:neocomplcache_disabled_sources_list = {'_' : ['dictionary_complete']} seems to get me something usable though.

Thanks for trying to look into it, feel free to close this unless you think I can provide anything else to help you out.

Shougo commented 11 years ago

I fixed the problem.