KDevFileManager performance

Matt Rogers mattr at kde.org
Thu Aug 17 23:20:28 UTC 2006

On Thursday 17 August 2006 14:57, Andras Mantia wrote:
> Hi,
>  I'm worried about the performance problems in the KDevFileManager
> class, due to the KDevProjectItem* way of storing the data. If these
> classes help later with the model/view stuff, I have no problem with
> them, but due to their tree-like structure it is hard and time
> consuming to work with them. For example if you want to get all the
> files that were added to the project, you would need to go through this
> structure using a recursive method. To find if a url was already added
> or not, you would have to do the same. To get information about the
> item, again, a search through all of the items.
>  For this reason I have a suggestion, which is to move allFiles from
> KDevProject to KDevFileManager. The reasoning is that this way I could
> implement a file manager which stores the URL->KDevProjectItem* mapping
> in a QHash or QMap and it will be much faster to retrieve all the
> above. allFiles could have access directly to this map, inProject could
> get the QList of allFiles and find there the URL and so on. It would be
> even more better if allFiles would return a QHash<KUrl,
> KDevProjectFileItem*>.
> Comments?

Have you done any profiling? Or are you just guessing? 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. There's just 
too much other stuff to do ATM.

More information about the KDevelop-devel mailing list