Regression: Caching of compiler defines/include

Sergey Kalinichev kalinichev.so.0 at gmail.com
Wed Jul 29 18:03:25 UTC 2015


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.

>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,

Also, please, check whether adding this line:
"SettingsManager::globalInstance()->provider()->registerCompiler(compiler);"
at settingsmanager:79 fixes the issue for you.

--
Sergey

On 7/29/15, Milian Wolff <mail at milianw.de> wrote:
> On Wednesday, July 29, 2015 03:56:29 PM Milian Wolff wrote:
>> Hey Sergey,
>>
>> your recent patch broke the caching of the GCCLikeCompiler includes and
>> defines, leading to excessive calls execve and string parsing etc. pp.
>> CompilerProvider uses configForItem which re-reads the settings and
>> recreates Compiler instances all the time, which is a huge waste of
>> resources.
>>
>> Did you not notice this extreme performance regression?
>>
>> Could you have a look at that now? I'm in the middle of something else
>> (KTextEditor plugin integration) and will revert your patch locally for
>> now.
>> Later today I'll then hopefully have time to fixup this issue, but I'd
>> appreciate if you could work on that ASAP. Please do test your changes
>> more
>> thoroughly - this should have been very obvious when you try to parse any
>> project.
>
> Oh, this only happens when a custom compiler is configured... I'll try to
> figure out a way to cache it somehow.
>
> Bye
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de


More information about the KDevelop-devel mailing list