[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kdepimlibs] [Bug 346644] KF5/KMail Performance Bottleneck in  Akonadi::StatisticsProxyModel::data(.
From:       Andreas Cord-Landwehr <cordlandwehr () kde ! org>
Date:       2015-05-09 18:48:37
Message-ID: bug-346644-17878-AGwVyR0Y4A () http ! bugs ! kde ! org/
[Download RAW message or body]

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

--- Comment #6 from Andreas Cord-Landwehr <cordlandwehr@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 watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic