[cfe-dev] Clang indexing library performance

Alexander Bolodurin alexander.bolodurin at gmail.com
Sun Oct 2 02:06:27 PDT 2011


On 02/10/2011, at 10:37 AM, Tobias Grosser wrote:

> On 10/01/2011 10:34 AM, Alexander Bolodurin wrote:
>> I was playing with libclang-based indexing and clang_complete plugin for Vim.
>> Having found completion responsiveness a bit lacking, I decided to track down whether it's plugin's fault.
> 
> And regarding clang_complete itself:
> 
> There are definitely some remaining performance problems in clang_complete itself. Try the attached two patches and check if you see some improvements.
> 
> You can get timing information in the status row, by setting
> 'g:clang_debug' to 1.
> 
> Can you report the timing for clang_complete, before and after these patches. It should have improved significantly.
> 
> Furthermore, if there is a large number of suggested completions clang_complete may take significant time to format them. This definitely could need some improvements too.
> 
> Cheers
> Tobi
> <0001-libclang-Enable-TranslationUnit.CacheCompletionResul.patch><0002-libclang-Do-not-reparse-the-file-right-after-parsing.patch>


It improves things a little, but not by much.

Before:

LibClang - First parse: 3.21348905563
LibClang - First reparse (generate PCH cache): 6.03147506714
LibClang - Code completion time: 2.16154503822
clang_complete: completion time (library) 11.986595
LibClang - Code completion time: 2.20204496384
clang_complete: completion time (library) 2.777556
LibClang - Code completion time: 2.21751308441
clang_complete: completion time (library) 2.794342

After:

LibClang - First parse: 3.13683891296
LibClang - Code completion time: 2.13823485374
clang_complete: completion time (library) 5.856766
LibClang - Code completion time: 2.18497300148
clang_complete: completion time (library) 2.758560
LibClang - Code completion time: 2.19934606552
clang_complete: completion time (library) 2.775554




More information about the cfe-dev mailing list