First try on a very large project

Milian Wolff mail at milianw.de
Wed Mar 13 20:08:05 GMT 2013


On Wednesday 13 March 2013 16:42:58 Olivier Hallot wrote:
> Hi Milian
> 
> Em 13-03-2013 14:59, Milian Wolff escreveu:
> > On Saturday 02 March 2013 12:20:27 Olivier Hallot wrote:
> >> Hi
> >> 
> >> I am trying to put LibreOffice into Kdevelop. I know it will be
> >> considered a crazy idea but anyway I want to give a try. The project is
> >> not a canonical c++ project and many IDE features are not available
> >> without special tweak, which I already know. So far I have the analyzer
> >> and and auto-completion working quite well, and this is already a win
> >> for me.
> > 
> > I use KDevelop with WebKit. Others use KDevelop with the Linux Kernel. So
> > why should LibreOffice be considered crazy? :]
> 
> hmm... of course :-)
> 
> >> Since I am not much skilled in IDEs I have some questions.
> >> 
> >> 1) Is there a regular expression that allow me to automatically include
> >> all <root_project>/<module>/source/inc into the search for the analyser?
> >> The includes are in the file .kdev_include_path
> > 
> > What exactly do you mean by that? Do you want to add these paths to the
> > include path? Or should files in there be parsed and errors reported? Or
> > should code completion be offered for API in there in other files? I will
> > need some more information on that.
> 
> sample of my include path, and incomplete:
> ----------------%<---------------
> /home/tdf/git/core/vcl/inc/
> /home/tdf/git/core/tools/inc/
> /home/tdf/git/core/sfx2/inc/
> /home/tdf/git/core/comphelper/inc/
> /home/tdf/git/core/ucbhelper/inc/
> ----------------%<---------------
> 
> The idea is to have a regexp to get all these "inc's" in one line...
> otherwise I 'll have to enter dozens of lines...

Ah, now I get it. That should be fairly trivial to implement and I understand 
how it can be useful in cases like this one. Please report a wish request for 
that on bugs.kde.org.

If you want to look into it, see 
kdevelop/languages/cpp/includepathresolver.cpp, function 
CustomIncludePathsSettings::read().

Note to self: That file needs to be cleaned up...

> >> 2) Is there a cache for the analyser? Each time I open the project it
> >> looks like it restart the analyser from scratch. Am I missing something?
> >> Note: On opening LibreOffice project, the CPU rises to 25% and I use
> >> 1,9GB of memory.
> > 
> > First up, what KDevelop version is that? I constantly try to optimize it
> > thus the newer KDevelop the better it should perform.
> 
> version 4.9.5 in a kubuntu 12.10 machine

That's the KDE version, what is the KDevelop version? See kdevelop --version.

> > That said, yes - there is a cache. But no matter what, once you restart
> > KDevelop we will have to validate the cache by stating every file and
> > checking some timestamp against what we have cached. This should be much
> > faster than no cache at all.
> > 
> > But:
> > - if you encounter crashes the cache is wiped to guard against crashes due
> > to corrupted binary data in the cache
> 
> I reported a bug last week.
> 
> > - if not every file was parsed the last time, there will be files left
> > that
> > need to be processed.
> > - if files have been changed (VCS update?) they need to be reparsed
> > - a bug might prevent the cache to work as intended
> > 
> > Cheers
> 
> I also noticed that cache corruption/crash occurs when I shut down the
> user session before Kdevelop ends its housekeeping.
> 
> Since the cache is possibly quite large, closing the Kdevelop session
> immediatly closes kdevelop windows, but kdevelop process is still
> running for a while (1 or 2 minutes).

Ah that - yes I have to improve this. This can easily be the reason for many 
issues people have with bigger sessions.

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: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20130313/8c7e6498/attachment.sig>


More information about the KDevelop mailing list