Regression: Caching of compiler defines/include

Milian Wolff mail at milianw.de
Wed Jul 29 22:44:47 UTC 2015


On Thursday, July 30, 2015 12:24:30 AM Milian Wolff wrote:
> On Wednesday, July 29, 2015 10:03:25 PM Sergey Kalinichev wrote:
> > Hi,
> > 
> > I can't reproduce it. I created a custom compiler, set custom
> > arguments for it and tried to parse a project, I get only one cache
> > miss, all subsequent calls to includes/defines use values from the
> > cache.
> 
> You need to add a custom path for any project. Essentially, just make sure
> you hit the long path of configForItem in compilerprovider.cpp
> 
> It will call:
> 
> SettingsManager::globalInstance()->readPaths
> doReadSettings
> createCompilerFromConfig
> createCompiler
> ...
> GccLikeCompiler::GccLikeCompiler
> 
> eventually then, the ::includes/::defines methods on this new compiler are
> getting called, which will not be cached (it's a new project!) and then it's
> really bad performance wise.
> 
> > >and recreates Compiler instances all the time
> > 
> > That's odd. Please check your config file (.kdev4 file), maybe it
> > contains compiler name that doesn't not exist? Note that if you added
> > a compiler here manually, you also must add it to the session config
> > file,
> 
> I did not add it manually, and this case may happen when something changes
> internally - and probably that's what is occurring. It must be handled
> gracefully!
> 
> > Also, please, check whether adding this line:
> > "SettingsManager::globalInstance()->provider()->registerCompiler(compiler)
> > ;" at settingsmanager:79 fixes the issue for you.
> 
> I'll now, and get back to you in a minute.

\o/ Thanks Sergey, that is exactly the issue. I'll push it now. Many thanks 
for the tip.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150730/d3519e78/attachment.sig>


More information about the KDevelop-devel mailing list