Frameworks & Performance Question
Hugo Pereira Da Costa
hugo.pereira at free.fr
Mon Dec 30 13:11:42 UTC 2013
On 12/30/2013 02:08 PM, Hugo Pereira Da Costa wrote:
> On 12/30/2013 12:42 PM, David Faure wrote:
>> 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).
> Concerning hooking some dbus into the style, oxygen (that in kf5
> derives from kstyle, as opposed to KDE 4.x) already do so for oxygen's
> own config change:
>
> // use DBus connection to update on oxygen configuration change
>
> QDBusConnection dbus = QDBusConnection::sessionBus();
>
> dbus.connect( QString(),
>
> QStringLiteral( "/OxygenStyle" ),
>
> QStringLiteral( "org.kde.Oxygen.Style" ),
>
> QStringLiteral( "reparseConfiguration" ), this,
> SLOT(oxygenConfigurationChanged()) );
>
>
> (in constructor)
>
>
> Could something similar be done in kstyle constructor's ?
> (though I have no clue about which signal things should connect to).
>
And also, I don't understand why this is necessary at all ? Should'nt
the reparseConfiguration be done 'upstream' (ksharedConfig)
automatically on e.g. file change ?
>
>
>>
>> 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:
>>
>
>
>
>
> _______________________________________________
> Kde-frameworks-devel mailing list
> Kde-frameworks-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131230/d587c0cf/attachment.html>
More information about the Kde-frameworks-devel
mailing list