Frameworks & Performance Question
David Faure
faure at kde.org
Mon Dec 30 11:42:31 UTC 2013
On Sunday 29 December 2013 20:07:38 Christoph Cullmann wrote:
> Hi,
>
> if I play around with Kate on KF5, it laggs like hell the whole time.
>
> I tried to profile, but guess I am stuck a bit.
>
> #10 0x00007ffff3fbeaa0 in KConfig::reparseConfiguration (this=0x688130) at
> /home/cullmann/local/kf5/src/frameworks/kconfig/src/core/kconfig.cpp:633
> #11 0x00007fffe5bad6b7 in KStyle::styleHint (this=0x658da0,
> hint=QStyle::SH_Widget_ShareActivation, option=0x0, widget=0x9f2050,
> returnData=0x0) at
Yep, every call to styleHint() calls reparseConfiguration(), which is crazy.
This really needs to be redone:
commit d2dad4199d03d492480c170deb786fa9e533b5bf
Author: Àlex Fiestas <afiestas at kde.org>
Date: Mon Dec 16 16:49:30 2013 +0100
[KStyle] Reparse the configuration each time styleHint is called
This is probably super expensive and it should only be done once it
is actually needed but it is the easy thing to do for now until we
hook some DBus into the style (or we find another solution).
CCMAIL: hugo at oxygen-icons.org
diff --git a/tier4/frameworkintegration/src/kstyle/kstyle.cpp
b/tier4/frameworkintegration/src/kstyle/kstyle.cpp
index a2a4a7f..490ed51 100644
--- a/tier4/frameworkintegration/src/kstyle/kstyle.cpp
+++ b/tier4/frameworkintegration/src/kstyle/kstyle.cpp
@@ -334,6 +334,7 @@ QIcon KStyle::standardIcon(StandardPixmap standardIcon,
const QStyleOption */*op
int KStyle::styleHint (StyleHint hint, const QStyleOption* option, const
QWidget* widget, QStyleHintReturn* returnData) const
{
+ KSharedConfig::openConfig()->reparseConfiguration();
switch (hint)
{
case SH_ItemView_ActivateItemOnSingleClick:
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list