Review Request 123810: Make code-completion faster

Milian Wolff mail at milianw.de
Mon May 18 16:21:32 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123810/#review80583
-----------------------------------------------------------

Ship it!


generally +1 from my side. just a couple of questions and minor issues.

thanks!


codecompletion/context.cpp (line 370)
<https://git.reviewboard.kde.org/r/123810/#comment55247>

    why the conditional here? shouldn't it always be
    
    declaration.first->qualifiedIdentifier()



codecompletion/context.cpp (line 372)
<https://git.reviewboard.kde.org/r/123810/#comment55248>

    this will break on nested namespaces, no? so shouldn't it recurse here instead into the internalContext?
    
    also, please add a comment here explaining what this does: "also include declarations in namespaces", and below "also include enumerators" or similar.



codecompletion/context.cpp (line 587)
<https://git.reviewboard.kde.org/r/123810/#comment55245>

    this also applies to the declarationsHash approach, so move this comment up.



codecompletion/context.cpp (line 592)
<https://git.reviewboard.kde.org/r/123810/#comment55246>

    shouldn't / couldn't we insert the declaration into the hash then? or is it not worth it?


- Milian Wolff


On May 17, 2015, 6:34 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123810/
> -----------------------------------------------------------
> 
> (Updated May 17, 2015, 6:34 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Instead of calling findDeclarations for each item found by clang, call allDeclarations once and cache the result. In case it can't find anything fall back to the findDeclarations.
>     
> This reduces code-completion time on average from 2000ms to 200ms for me.
> 
> 
> Diffs
> -----
> 
>   codecompletion/context.cpp 5027dcd 
> 
> Diff: https://git.reviewboard.kde.org/r/123810/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150518/03e95392/attachment-0001.html>


More information about the KDevelop-devel mailing list