Review Request 122160: WIP: Use buddy as fallback for headers without explicitly pinned TU.

Milian Wolff mail at milianw.de
Wed Jan 21 22:28:25 UTC 2015



> On Jan. 21, 2015, 2:26 p.m., Sergey Kalinichev wrote:
> > Looks good for me.
> > 
> > Can't we maybe store information about whenever a document is being reparsed for the second time in ClangSupport or ClangIndex to prevent endless recursion?

Yep, afaik there is actually API to mark a rescheduled parse job. So we just need to check that flag. Python is using it, afaik, for similar reasons.


- Milian


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


On Jan. 20, 2015, 12:55 a.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122160/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2015, 12:55 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> In such cases, it's worthwile to use the source buddy as best-guess as
> it allows us to get rid of the parse run for the "header TU" which
> gets thrown away later on anyways.
> 
> Note that this might be troublesome and lead to infinite recursion
> when the buddy's TU is not including the header file, as we'd then
> reschedule the header for parsing and end up with the same situation
> as before. Suggestions on how to fix this would be welcome...
> 
> Performance wise, this patch improves the index run on a 48 file
> project using STL: It goes from ~17s down to ~14s, just b/c we safe
> a few needless clang runs on "header TUs".
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 22deffa2bbd5c7e2558ab1548b4447667d9671e4 
>   clangsupport.cpp f4f49b079d52462cfb0d56086780751605a6ab46 
>   documentfinderhelpers.h  
>   documentfinderhelpers.cpp  
>   duchain/CMakeLists.txt 8ed282b652361c45c668fa948917e075fed4f277 
>   duchain/clangindex.cpp 25c7855e7bd67aa2a3be28f1ea803dd025e6a1ba 
> 
> Diff: https://git.reviewboard.kde.org/r/122160/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Milian Wolff
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150121/ccec45ce/attachment.html>


More information about the KDevelop-devel mailing list