Review Request 123924: Optimize KIconEngine::availableSizes()
Aleix Pol Gonzalez
aleixpol at kde.org
Tue Jun 2 16:02:44 UTC 2015
> On May 28, 2015, 5:18 p.m., Milian Wolff wrote:
> > src/kiconengine.cpp, line 116
> > <https://git.reviewboard.kde.org/r/123924/diff/1/?file=378265#file378265line116>
> >
> > in KF6, this should also not use QList, but QVector instead. on 32bit platforms, a QList<QSize> is pretty damn slow
That's QIconEngine API, so for Qt6 ;).
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123924/#review80929
-----------------------------------------------------------
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/20150602/14d1a43c/attachment.html>
More information about the Kde-frameworks-devel
mailing list