[kdepimlibs] [Bug 346644] KF5/KMail Performance Bottleneck in Akonadi::StatisticsProxyModel::data(...)

Andreas Cord-Landwehr cordlandwehr at kde.org
Sat May 9 19:48:37 BST 2015


https://bugs.kde.org/show_bug.cgi?id=346644

--- Comment #6 from Andreas Cord-Landwehr <cordlandwehr at kde.org> ---
There actually happen quite interesting things behind the scenes. Here, my
first analysis what happens (all assertions I do below are actually verified):

1) in kdepimlibs/akonadi/src/core/models/statisticsproxymodel.cpp
the model's data method returns
QIcon::fromTheme( CollectionUtils::displayIconName( collection ) )
this method is obviosly called a very big number of times

2) in qtbase/src/gui/image/qicon.cpp
the correctly cached icon from the internal cache is selected,
but then for a fallback check the following is tested:
    if (qApp && icon.availableSizes().isEmpty())
        return fallback;
and here the trouble starts with QIcon::availableSizes()
which triggers a call to KIconEngine::availableSizes()

3) kiconthemes/src/kiconengine.cpp
here we have a check that actually an icon exists (introduced in RR 122608,
[2]), which calls the following very costly check:

   if (mIconLoader->iconPath(mIconName, KIconLoader::Desktop,
       KIconLoader::MatchBest).isEmpty()) {
       return QList<QSize>();
   }

So, the question is where we should fix this.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list