<table><tr><td style="">davidedmundson created this revision.<br />davidedmundson added a reviewer: Plasma.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2756" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Plasma::PluginLoader::self()->listAppletInfo(QString() is expensive, it<br />
loads and parses every .desktop file individually. Twice.</p>
<p>The main offender is the defaultApplets property, which gets requested<br />
multiple times from JS space, and we reparse the files every time.</p>
<p>Moving the work to the constructor solves that. This saves loading (on<br />
my machine) ~900 desktop files.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">wiped config, defaults appeared</li>
<li class="remarkup-list-item">DBus activated still worked</li>
<li class="remarkup-list-item">restore works as before</li>
</ul>
<p>Running "time plasmashell" shows:</p>
<p>BEFORE:<br />
plasmashell 4.01s user 0.46s system 87% cpu 5.116 total<br />
plasmashell 4.01s user 0.54s system 74% cpu 6.124 total</p>
<p>AFTER: <br />
plasmashell 3.17s user 0.42s system 68% cpu 5.259 total<br />
plasmashell 3.18s user 0.46s system 81% cpu 4.475 total</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rPLASMAWORKSPACE Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2756" rel="noreferrer">https://phabricator.kde.org/D2756</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>applets/systemtray/systemtray.cpp<br />
applets/systemtray/systemtray.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>