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

extremely slow when I type inside single quotes (&ft = vim) #392

Closed zhaocai closed 11 years ago

zhaocai commented 11 years ago

for example , when I start to type in [^] as below.

nnoremap <silent> [unite]bm  :<C-u>exec
    \ 'Unite -profile-name=ctrlp -buffer-name=bookmark bo[^]okmark:*'<CR>

profile results shows neocomplcache#sources#vim_complete#helper#command is the culprit.

FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
    9  44.749320   0.000720  neocomplcache#sources#vim_complete#helper#command()
    9  44.675276   0.000182  neocomplcache#sources#vim_complete#helper#get_command_completion()
    6  15.266782   0.001939  neocomplcache#handler#_do_auto_complete()
    4  15.184263   0.000849  neocomplcache#complete#_get_results()
    4  15.126077   0.001497  neocomplcache#complete#_set_results_words()
    3  14.976563   0.001397  462()
    7  14.897156   0.123957  <SNR>143_initialize_sources()
    3  14.893242   0.000817  neocomplcache#sources#vim_complete#helper#mapping()
    3  14.891272   0.000191  neocomplcache#sources#vim_complete#helper#execute()
    3  14.889631   0.000247  neocomplcache#sources#vim_complete#helper#customlist()
    3  14.889303   0.002693  unite#complete_source()
    4  14.831952   0.001947  <SNR>143_initialize_current_unite()
    4  14.827164   0.001193  <SNR>143_initialize_loaded_sources()
    3  14.810075   0.000383  unite#args_complete()
   14  14.773783   0.063701  <SNR>143_load_default_scripts()
    7   0.385458   0.384570  <SNR>220_caching_current_buffer()
    1   0.332459   0.000098  <SNR>220_check_recache()
    1   0.332315   0.000140  neocomplcache#sources#buffer_complete#caching_current_block()
    1   0.256781   0.000056  <SNR>196_exit()
    1   0.256725   0.000110  unite#force_quit_session()

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    7   0.385458   0.384570  <SNR>220_caching_current_buffer()
   78   0.156490   0.138311  Powerline()
   10   0.129608   0.128623  neocomplcache#helper#complete_check()
    7  14.897156   0.123957  <SNR>143_initialize_sources()
    2              0.077219  <SNR>63_guess()
   11   0.085003   0.076960  GoldenView#Resize()
    5   0.103606   0.072488  <SNR>188_save()
    2              0.063790  UltiSnips_FileTypeChanged()
   14  14.773783   0.063701  <SNR>143_load_default_scripts()
   10   0.090044   0.061732  <SNR>186_save()
    1   0.256587   0.059585  <SNR>143_quit_session()
    1              0.047515  476()
    1   0.134221   0.032985  886()
 6165              0.031118  <SNR>188_convert2list()
  310   0.030151   0.030084  <SNR>358_MarkMatch()
   82   0.048907   0.029655  neocomplcache#helper#match_word()
    9   0.035989   0.029378  neocomplcache#filters#keyword_filter()
 4830              0.028312  <SNR>186_convert2list()
   25              0.021203  neobundle#config#get_autoload_bundles()
   14              0.018763  neocomplcache#helper#get_syn_name()
Shougo commented 11 years ago

I fixed it. Please update neocomplcache and unite.vim.

zhaocai commented 11 years ago

thanks.