[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.
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)
rPLASMADESKTOP Plasma Desktop
To: ivan, davidedmundson, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Plasma-devel