D22531: [KColorSchemeManager] Optimize preview generation
Kai Uwe Broulik
noreply at phabricator.kde.org
Thu Jul 18 14:16:47 BST 2019
broulik created this revision.
broulik added a reviewer: Frameworks.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
broulik requested review of this revision.
REVISION SUMMARY
Create them only on-demand (e.g. when the menu opens or the DecorationRole is queried)
and also use KConfig::SimpleConfig as we're passing in an absolute file path anyway.
TEST PLAN
On Kate startup KColorSchemeManager went from 12% cost to 2.6% and saves around 40ms Kate startup time for me.
Previews are still generated properly when I enter the menu. A `QComboBox` using the model still gets its
previews generated when it reads the `DecorationRole`
REPOSITORY
R265 KConfigWidgets
BRANCH
ondemandpreview
REVISION DETAIL
https://phabricator.kde.org/D22531
AFFECTED FILES
src/kcolorschememanager.cpp
src/kcolorschememanager_p.h
To: broulik, #frameworks
Cc: kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190718/dc50f09d/attachment.html>
More information about the Kde-frameworks-devel
mailing list