D18612: Cache the default KColorScheme configuration
Milian Wolff
noreply at phabricator.kde.org
Wed Jan 30 08:44:33 GMT 2019
mwolff created this revision.
mwolff added reviewers: Kate, KDevelop, dfaure.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
mwolff requested review of this revision.
REVISION SUMMARY
KDevelop, Kate and probably other applications too, recreate
KColorScheme instances repeatedly. This was very costly since we
ended up reparsing the internal color scheme configuration file
every time - the shared configuration wasn't stored anywhere thus
it's refcount dropped to zero after once the KColorScheme was
fully constructed.
Optimize this apparently common scenario by caching the configuration
in a thread_local variable and only open a new configuration when the
user changed the application color scheme.
REPOSITORY
R265 KConfigWidgets
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D18612
AFFECTED FILES
src/kcolorscheme.cpp
To: mwolff, #kate, #kdevelop, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190130/2737d26c/attachment.html>
More information about the Kde-frameworks-devel
mailing list