KDE/kdevelop

Adam Treat treat at kde.org
Fri Aug 4 18:58:46 UTC 2006


SVN commit 569772 by treat:

Optimize project loading, document loading, and background parser.

1. Introduce caching mechanism in the background parser and codeproxy.
This allows us to perform an expensive operation only after a number of
files have been parsed rather than for every file.

2. Part creation now caches the KParts::Factory(s) so we don't use KLibLoader
for every creation of a document.

3. Change KDevDocument so that we cache information like the mimetype rather
than looking it up by url every time.

4. Change the way we load KTextEditor documents at startup.  Basically, KParts::openURL
is expensive so we don't do that at startup.  Instead this is done when the doc first
becomes active.  Will revisit this if it is too much of a delay for the user.

5. For the time being load every project file into the backgroundparser at startup.  Use
this to test for other machines.  I want to see how long it takes.

Some marks:

With these optimizations I can load 1268 files (every c++ src/header file in kdevelop project)
at startup as open documents in under two minutes.  Each file is parsed and a codemodel is
computed.  Each file has a KTextEditor part created for it.  And it takes about %32 of
active memory once it is done.

With no open documents at startup, I can still parse every file, all 1268, at startup in 
under 1 minute.

That's pretty fast.

Congratulations to Roberto and everyone else.

CCMAIL:kdevelop-devel at kdevelop.org



 M  +1 -1      languages/cpp/cpplanguagesupport.cpp  
 M  +40 -17    lib/kdevbackgroundparser.cpp  
 M  +9 -1      lib/kdevbackgroundparser.h  
 M  +17 -1     lib/kdevcodeaggregate.cpp  
 M  +1 -0      lib/kdevcodeaggregate_p.h  
 M  +5 -0      lib/kdevcodeproxy.cpp  
 M  +2 -0      lib/kdevcodeproxy.h  
 M  +19 -3     lib/kdevdocument.cpp  
 M  +18 -3     lib/kdevdocument.h  
 M  +49 -77    lib/kdevdocumentcontroller.cpp  
 M  +1 -9      lib/kdevdocumentcontroller.h  
 M  +11 -3     lib/kdevlanguagesupport.cpp  
 M  +33 -20    lib/kdevpartcontroller.cpp  
 M  +3 -1      lib/kdevpartcontroller.h  
 M  +10 -2     lib/kdevprojectcontroller.cpp  
 M  +1 -1      plugins/documentview/kdevdocumentview_part.cpp  






More information about the KDevelop-devel mailing list