Review Request: Project model speedups for project files with lots of directories and files.

Brandon Ehle azverkan at yahoo.com
Wed Apr 21 16:34:37 UTC 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3722/
-----------------------------------------------------------

Review request for KDevelop.


Summary
-------

My test case consists of 3 projects (Linux kernel main tree, DRM tree, and Mesa tree).


Changes:

1) Replace recursion inside itemsForUrl with a QMultiHash lookup to speedup itemsForUrl() on large projects.

2) Change the url() function for the ProjectBaseItem to return a constant reference instead of a copy to reduce the time spent inside the KUrl() constructor.

3) Replace dynamic_cast with virtual function based upcasting inside filesForUrl() and foldersForUrl().


Remaining problems:

1) QStandardItemModel insertion is still extremely slow, but fixing that is a much larger change.

2) There is a lot of mutex contention showing up in oprofile measumerements on a 4 core machine.  I believe this is coming from the IndexedString() constructor, but need to verify yet.  If that is the case the IndexedString() constructor either needs to be optimized or addFileSet() should switch away from IndexedString to QString or similar. 


Also while creating this patch, I ran into the problem that the existing d->fileSet as used by removeFileSet() could potentially have issues when the same path is added more than once.


This addresses bug 215968.
    https://bugs.kde.org/show_bug.cgi?id=215968


Diffs
-----

  /trunk/extragear/sdk/kdevplatform/interfaces/iproject.h 1116332 
  /trunk/extragear/sdk/kdevplatform/project/projectmodel.h 1116332 
  /trunk/extragear/sdk/kdevplatform/project/projectmodel.cpp 1116332 
  /trunk/extragear/sdk/kdevplatform/shell/project.h 1116332 
  /trunk/extragear/sdk/kdevplatform/shell/project.cpp 1116332 
  /trunk/extragear/sdk/kdevplatform/tests/testproject.h 1116332 

Diff: http://reviewboard.kde.org/r/3722/diff


Testing
-------


Thanks,

Brandon





More information about the KDevelop-devel mailing list