KDevFileManager performance

Adam Treat treat at kde.org
Fri Aug 18 16:42:39 UTC 2006

On Friday 18 August 2006 12:10 pm, Andras Mantia wrote:
> On Friday 18 August 2006 02:20, Matt Rogers wrote:
> > Have you done any profiling?
> Not when I wrote the mail....
> > Or are you just guessing?
> Yes, but based on reading the code and thinking a little.
> > Please come
> > back with hard numbers on the performance difference between the
> > current code and your proposal and we can take a look at doing
> > something different.
> I wrote some code to compare the two behavior. With a test data of 64
> folders and 289 files loaded into the model, I searched for all files
> trying to find if they are in the model or not (this is the same what
> we want, find the KDevProject*Item for a url) using a tree traversal
> and using a QHash. Using the tree traversal takes between 1-17 ms,
> while using QHash is 0-1 ms, usually 0 here (AMD64 3200+ CPU).
> This certainly tells me that the current storage doesn't scale for many
> files and directories.
> I committed the code to KDevProject::inProject so you can check my
> benchmark.

Please don't commit benchmarks like that to the actual code.  Besides, I agree 
that a QHash is probably the way to store this, but it isn't such a big deal.  
We don't need to debate this right now.

> > There's just too much other stuff to do ATM.
> Jens explained why we are talking about this classes. We wanted tohave a
> working project implementation for Quanta so we can start to work on
> other issues.

Sure.  Unfortunately, right now the API is subject to a lot of change.  There 
are no guarantees that the API you are coding against right now won't change 
drastically even in the short term.

> Andras

More information about the KDevelop-devel mailing list