How can I force parser to reparse the project?

Kevin Funk kfunk at kde.org
Tue Nov 18 11:49:41 GMT 2014


On Tuesday 18 November 2014 12:23:48 René J.V. Bertin wrote:
> On Tuesday November 18 2014 11:10:36 Kevin Funk wrote:
> > 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.
> 
> If so, then why do I need to force a re-parse if I open a project without
> parsing it completely when opening?
> > It is cached to *not* require a full re-parser of your session each time
> > you fire up KDevelop, obviously.
> 
> As I said, I have yet to notice a difference between a full (re)parse and
> one using the cached information. They're both so slow that I'm very
> tempted to try and work without caching for a while.

Then something is very broken for you. Please check and debug.

> > 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).
> 
> Yes, and then it recreates that information unless you force it to stop.

That's the point of it, caching information.

> That's not exactly what I meant.The cache data isn't in the most obvious of
> locations 

The location is a FDO standard, please google for XDG_CACHE_HOME.

> (and it's even less straightforward to know which cache dir
> corresponds to what session);

Well, it's internal data, nothing the user should need to worry about.

Well, and as Milian, there's a much simpler way to clean the cache (which I 
forgot about): 

 $ CLEAR_DUCHAIN_DIR=1 kdevelop ...

> it'd be nice if it could be deleted
> automatically if you close a project from a session, or delete a session.

Uh? That's the whole point of that cache...
Caching data across session starts.

> 
> Cheers,
> René

Please check what the real problems are. *Having* the cache definitely isn't 
an issue, it has an enormous impact on session boot times. If you don't notice 
a speed difference for cached session startups, then *this* is an issue and 
needs to be debugged.

Cheers

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



More information about the KDevelop mailing list