[Differential] [Commented On] D986: Revamp of the activity switcher backend
davidedmundson (David Edmundson)
noreply at phabricator.kde.org
Fri Feb 19 00:33:20 UTC 2016
davidedmundson added inline comments.
INLINE COMMENTS
imports/activitymanager/sortedactivitiesmodel.cpp:228 We should cache the config as a member var and only reparse when in ::currentActivity changes. Otherwise you're parsing an entire config file (in fact 3, see last comment) lots of times.
If this gets used by a QWidget API that hammers data() on every repaint. If this is always purely QtQuick it's generally OK as the delegate's have to internally cache - but it's still once per activity rather than just once.
for a speedup open this to SimpleConfig. That saves it also loading in kglobals and the rest of the cascading.
imports/activitymanager/sortedactivitiesmodel.cpp:239 Yep, you're right.
For the time order to have changed, current activity would have changed dataChanged().
This is absolutely fine then.
imports/activitymanager/sortedactivitiesmodel.cpp:354 should check it's >= 0 (in both cases)
REPOSITORY
rPLASMADESKTOP Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D986
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: ivan, davidedmundson, sebas, mart
Cc: plasma-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160219/a2d6e45d/attachment.html>
More information about the Plasma-devel
mailing list