How can I force parser to reparse the project?

Kevin Funk kfunk at kde.org
Tue Nov 18 10:10:36 GMT 2014


On Tuesday 18 November 2014 10:48:25 René J.V. Bertin wrote:
> On Tuesday November 18 2014 10:23:04 Kevin Funk wrote:
> >> How can I force parser to reparse the project?
> >
> >Normally this shouldn't be needed.
> >
> >What problems are you experiencing?
> 
> One very good reason: if your session is set not to parse projects upon
> load. I've been told one can use the "Reload" context menu for that, but
> I'm not convinced that triggers a reparse reliably.
> 
> To be honest, I just noticed the other day that I have over 3Gb of
> kdevduchain (or some such name) cache data, and I have absolutely no idea
> what it's used for.

It caches all the data which was pulled out from the resp. language support 
plugin. You could understand it as parser cache -- it contains all the 
information about the bits and pieces in your source code.

It is cached to *not* require a full re-parser of your session each time you 
fire up KDevelop, obviously.

> Either I allow projects to be (re)parsed completely
> when I open them and I get the context-sensitive goodies (prototypes,
> doxygen docu, tags), or I don't and the only way to obtain that information
> is to force a parse for the file I'm in. And the only way I found that does
> not involve mousing to the Problems toolview and clicking on that little
> "recycle" icon is to save the file which is obviously not always desirable
> or even an option. Oh, and there doesn't seem to be a noticeable speed
> difference in (re)parsing a full project after a normal open or after
> accepting the suggestion to dish the cached data.
> 
> Subsidiary question: under what conditions is that cached stuff cleaned out
> automatically?

If your session crashes, you'll get that popup asking you whether you want to 
clean your cache. Clicking yes here will wipe the DUChain cache (i.e. 
~/.cache/kdevduchain/kdevelop-$SESSIONHASH).

> 
> R.

Hope that helps,

Greets

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org



More information about the KDevelop mailing list