Review Request 111617: Add a cache to speed-up the project filter

Milian Wolff mail at milianw.de
Sat Jul 20 16:15:50 UTC 2013



> On July 20, 2013, 3:10 p.m., Milian Wolff wrote:
> > project/projectproxymodel.h, line 57
> > <http://git.reviewboard.kde.org/r/111617/diff/1/?file=172581#file172581line57>
> >
> >     use QHash
> 
> Albert Vaca Cintora wrote:
>     Could you explain why?

Because QMap is sorted which is not required here. Furthermore QHash provides a O(1) lookup compared to the O(log(n)) lookup of a QMap. See e.g. http://qt-project.org/doc/qt-5.1/qtcore/containers.html#algorithmic-complexity and http://woboq.com/blog/qmap_qhash_benchmark.html .


- Milian


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


On July 20, 2013, 3:55 p.m., Albert Vaca Cintora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111617/
> -----------------------------------------------------------
> 
> (Updated July 20, 2013, 3:55 p.m.)
> 
> 
> Review request for KDevelop and Milian Wolff.
> 
> 
> Description
> -------
> 
> A performance improvement to my previous patch to the project filter [1] using a cache as suggested by Milian.
> 
> This patch also adds a very small change: It makes the project root folder always visible regardless of the filter.
> 
> [1] https://git.reviewboard.kde.org/r/111537/
> 
> 
> Diffs
> -----
> 
>   project/projectproxymodel.h c53d870 
>   project/projectproxymodel.cpp c4d1a91 
> 
> Diff: http://git.reviewboard.kde.org/r/111617/diff/
> 
> 
> Testing
> -------
> 
> Manual testing
> 
> 
> Thanks,
> 
> Albert Vaca Cintora
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130720/d299c307/attachment.html>


More information about the KDevelop-devel mailing list