[Differential] [Request, 66 lines] D2756: Cache system tray applet information
davidedmundson (David Edmundson)
noreply at phabricator.kde.org
Mon Sep 12 20:44:19 UTC 2016
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
Plasma::PluginLoader::self()->listAppletInfo(QString() is expensive, it
loads and parses every .desktop file individually. Twice.
The main offender is the defaultApplets property, which gets requested
multiple times from JS space, and we reparse the files every time.
Moving the work to the constructor solves that. This saves loading (on
my machine) ~900 desktop files.
TEST PLAN
- wiped config, defaults appeared
- DBus activated still worked
- restore works as before
Running "time plasmashell" shows:
BEFORE:
plasmashell 4.01s user 0.46s system 87% cpu 5.116 total
plasmashell 4.01s user 0.54s system 74% cpu 6.124 total
AFTER:
plasmashell 3.17s user 0.42s system 68% cpu 5.259 total
plasmashell 3.18s user 0.46s system 81% cpu 4.475 total
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D2756
AFFECTED FILES
applets/systemtray/systemtray.cpp
applets/systemtray/systemtray.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: davidedmundson, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160912/03e6e569/attachment.html>
More information about the Plasma-devel
mailing list