Review Request 127380: More conservative approach to saving some disk accesses

Aleix Pol Gonzalez aleixpol at kde.org
Thu Mar 17 12:24:18 UTC 2016



> On March 17, 2016, 8:57 a.m., Kevin Funk wrote:
> > Since you asked for review: I don't know the code enough to judge. Generally I'd say "yes".
> > 
> > Does `iconPath(..., KIconLoader::MatchBest)` return results you'd have received with `iconPath(..., KIconLoader::MatchExact)`?

I haven't seen differences, tests still pass. `MatchExact` is a more restricted version of `MatchBest`.

I'd say that if there's a case that currently doesn't return the best match when passing `KIconLoader::MatchBest`, then we need to fix the algorithm. My impression is that `MatchExact` pass was introduced as an optimization, although in practice it doesn't act as such.


- Aleix


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127380/#review93636
-----------------------------------------------------------


On March 15, 2016, 2:52 a.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127380/
> -----------------------------------------------------------
> 
> (Updated March 15, 2016, 2:52 a.m.)
> 
> 
> Review request for KDE Frameworks and Christoph Feck.
> 
> 
> Repository: kiconthemes
> 
> 
> Description
> -------
> 
> My previous approach to KIconThemes felt like a dead end, I decided I'll take a more conservative approach. Here's a first step.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 61e81f6 
>   autotests/kiconloader_benchmark.cpp PRE-CREATION 
>   src/kiconloader.cpp 75ab482 
>   src/kicontheme.cpp 0996054 
> 
> Diff: https://git.reviewboard.kde.org/r/127380/diff/
> 
> 
> Testing
> -------
> 
> Attempts to call `KIconThemeDir::iconPath` on the benchmark: 4318 after/5040 before= 17% less QFile::exists
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160317/4b759c11/attachment.html>


More information about the Kde-frameworks-devel mailing list