Review Request 119959: Do not create multiple chains/env files on update.

Milian Wolff mail at milianw.de
Thu Aug 28 11:50:51 UTC 2014



> On Aug. 28, 2014, 4:15 a.m., Sergey Kalinichev wrote:
> > Ok, just retested it. Yeah regarding code-completion it's so much better!
> > But I still see a lot of those: ClangParsingEnvironmentFile::needsUpdate: environment differs, require update: "/usr/include/*
> > messages when switching between files (e.g. working with clanghelpers.cpp then switch to clangparsejob.cpp work here then come back to clanghelpers.cpp), it takes some time to get code-completion/problems back - about 10-15 seconds for me.
> > I think it shouldn't be like that.

Yes, I agree. I'll push this changeset first and try to investigate the rest later.

Cheers, thanks for testing!


- Milian


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


On Aug. 27, 2014, 8:49 p.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119959/
> -----------------------------------------------------------
> 
> (Updated Aug. 27, 2014, 8:49 p.m.)
> 
> 
> Review request for KDevelop and Sergey Kalinichev.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> The implementation of ClangParsingEnvironmentFile::matchEnvironment
> was too restrictive. A "match" should just indicate that a given
> DUChain is valid for a given environment in principle, not whether
> its environment is equal (or so I think right now).
> 
> Otherwise, we end up creating multiple TopDUContexts with associated
> ClangEnvironmentFiles whenever the environment has changed and a
> reparse is triggered.
> 
> Properly update environment and modification revision of includes.
> 
> Otherwise these files will be parsed over and over again since
> neither their environment, nor their timestamp is updated properly.
> 
> This hopefully fixes the slowness during code completion.
> 
> 
> Diffs
> -----
> 
>   clangparsejob.cpp 578d3abbb84671113da43eab9f7bb0401c7f71e1 
>   clangsupport.cpp 7d091eb3873a973ae283dcdafb9551d0fd16d325 
>   duchain/clanghelpers.cpp 6db552dfde667335a145d99852efbb3a74985f50 
>   duchain/clangparsingenvironmentfile.cpp b7d903c9961beeecaca7438d7f5c96be5394387c 
>   tests/test_duchain.cpp d0146c92f8a7d878aaca8266d6c3f07b24a60701 
> 
> Diff: https://git.reviewboard.kde.org/r/119959/diff/
> 
> 
> Testing
> -------
> 
> The unit test now passes, but I could never reproduce this:
> 
> commit fccc9b4311abb8f858c18e80348df8d3e09b1ce3
> Author: Sergey Kalinichev <kalinichev.so.0 at gmail.com>
> Date:   Tue Aug 19 21:54:57 2014 +0400
> 
>     Implement ClangParsingEnvironmentFile::matchEnvironment
>     
>     Now code completion is so much faster!
> 
> so I don't know whether the code completion is now slower again? Anyhow, if that is the case we'd need a different fix anyways.
> 
> 
> Thanks,
> 
> Milian Wolff
> 
>

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


More information about the KDevelop-devel mailing list