Review Request 129856: KEmoticons: performance improvement
David Faure
faure at kde.org
Fri Jan 20 13:15:09 UTC 2017
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129856/
-----------------------------------------------------------
Review request for KDE Frameworks, Martin Klapetek, Harald Sitter, and Volker Krause.
Repository: kemoticons
Description
-------
Don't parse kdeglobals every time KEmoticons::theme() is called.
KSharedConfig is only efficient if something keeps a refcount on it,
which is typically not the case for KSharedConfig::openConfig("kdeglobals").
So use the default-constructed KSharedConfig instead, for this.
Found by interrupting kmail in gdb, KTextToHTMLEmoticons::parseEmoticons
(used by MimeTreeParser) calls KEmoticons::theme().
Interestingly this problem was already mentioned in a commit message from Volker in 2015 ;)
Diffs
-----
src/core/kemoticons.cpp 0e216af7b871a99e6265ec43783904772953f824
Diff: https://git.reviewboard.kde.org/r/129856/diff/
Testing
-------
It compiles and the existing unittests in kemoticons still pass. That's something, already :)
Thanks,
David Faure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170120/bf84ca4b/attachment.html>
More information about the Kde-frameworks-devel
mailing list