xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.96k stars 308 forks source link

LibClang code completion -> filter time takes 75% of overall search time #552

Closed Rtak1001 closed 5 years ago

Rtak1001 commented 6 years ago

I have a problem considering performence of clang_complete, to be exact filtering part.

Here is the output using debug mode:

capture

Notice the big number on Count # Results (63227) That must be the part of the aswer. Everything is installed correctly.

I'am using vim with windows 7 x64. Code on which i was testing was writen in c++. Problem is present with big ( > 100 000 lines ) and small projects ( < 100 lines )

This particular timings are using an older laptop, about 8 years: ->T9300, 4gb ram ddr2, SSD samsung 850 evo.

However the same problem occurs on my newer pc: ->i7-6700k,16gb ddr5, SSD 850 evo. The timings are bit better but still noticeable on filtering > 600ms

I tried to disable all plugins except clang and all custom options, problem still occurs. No errors are thrown after calling g:ClangUpdateQuickFix()

this are my vimrc options referencing clang: let g:SuperTabDefaultCompletionType='' let g:clang_library_path='C:\Program Files\LLVM\bin\libclang.dll' let g:clang_debug = 1 "let g:clang_use_library=1 "by default this is 1 (ON) let g:clang_complete_copen=0 let g:clang_complete_macros=1 let g:clang_complete_patterns=0 let g:clang_auto_user_options='' set conceallevel=2 set concealcursor=vin let g:clang_snippets=1 let g:clang_conceal_snippets=1 let g:clang_snippets_engine='clang_complete' set completeopt=menu,menuone set pumheight=20