Cache system tray applet information

Authored by davidedmundson on Sep 13 2016, 5:37 PM.

Description

Cache system tray applet information

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

Reviewers: Plasma, mart

Reviewed By: mart

Subscribers: mart, broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D2756

Details

Committed
davidedmundsonSep 13 2016, 5:37 PM
Reviewer
mart
Differential Revision
D2756: Cache system tray applet information
Parents
R120:f78fbac8ff98: Don't constrain width of Text field on translated text
Branches
Unknown
Tags
Unknown