Review Request 123924: Optimize KIconEngine::availableSizes()

Martin Gräßlin mgraesslin at kde.org
Thu May 28 14:49:17 UTC 2015


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


+1

- Martin Gräßlin


On May 28, 2015, 4:41 p.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123924/
> -----------------------------------------------------------
> 
> (Updated May 28, 2015, 4:41 p.m.)
> 
> 
> Review request for KDE Frameworks and Christoph Feck.
> 
> 
> Repository: kiconthemes
> 
> 
> Description
> -------
> 
> It's called a ton of times (over 30k times when opening kdevelop and changing area at some point) and it's quite slow nowadays. The reason is that we're retrieving the icon path every time to see if it's available (because it goes through aaaaaaall of the themes' directories to find the best available icon).
> 
> This patch adds a dictionary in the KIconLoader so that we can cache for the icons we already found, clears it when the theme changes.
> Also we're construct the same sizes list every time, now we're always returning the same list.
> 
> 
> Diffs
> -----
> 
>   src/kiconengine.h 461efff 
>   src/kiconengine.cpp 208c055 
>   src/kiconloader.h 7944726 
>   src/kiconloader.cpp c47eecb 
> 
> Diff: https://git.reviewboard.kde.org/r/123924/diff/
> 
> 
> Testing
> -------
> 
> Tests still pass.
> It doesn't show a big problem in the same use-case in kdevelop anymore (99.5% of hits).
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

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


More information about the Kde-frameworks-devel mailing list