Review Request 111617: Add a cache to speed-up the project filter
Milian Wolff
mail at milianw.de
Sat Jul 20 15:10:43 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111617/#review36215
-----------------------------------------------------------
project/projectproxymodel.h
<http://git.reviewboard.kde.org/r/111617/#comment26800>
use QHash
project/projectproxymodel.cpp
<http://git.reviewboard.kde.org/r/111617/#comment26801>
whitespaces after comma, break line before second this
project/projectproxymodel.cpp
<http://git.reviewboard.kde.org/r/111617/#comment26803>
can't you check sourceParent here? i.e. just put this check based on sourceParent at the very top of this function?
project/projectproxymodel.cpp
<http://git.reviewboard.kde.org/r/111617/#comment26802>
use iterators to prevent a second lookup:
... it = mFilterCache.constFind(item);
if (it != mFilterCache.constEnd()) {
// cache hit
return it.value();
}
project/projectproxymodel.cpp
<http://git.reviewboard.kde.org/r/111617/#comment26804>
as a first variant that should be sufficient, maybe add a comment saying that this could be improved by:
- only recache for items where the data got changed
- only remove items that where removed from the model
- only add items that where added to the model (this might actually work already)
- Milian Wolff
On July 20, 2013, 1:39 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, 1:39 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/5308f041/attachment.html>
More information about the KDevelop-devel
mailing list