<table><tr><td style="">mart created this revision.<br />mart added a reviewer: Plasma.<br />Restricted Application added projects: Plasma, Frameworks.<br />Restricted Application added subscribers: Frameworks, plasma-devel.<br />mart requested review of this revision.
</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/D10512" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>preload popups of some applets after init in the background<br />
based on a value of X-Plasma-PreloadWeight in the desktop file<br />
if present, otherwise some default values based on the applet<br />
type (Provides)</p>
<p>Save the weight in the config, if an applet is never opened,<br />
slowly decrease the weight, when it reaches 0 don't preload it<br />
next start, increase every time it gets opened, so at the moment<br />
it's quite aggressive about preloading, in order to not do it<br />
a lot of plasma startups without touching the applet are needed</p>
<p>Applet with a very big weigth will be preloaded immediately,<br />
therefore having an impact on the time it will take to have<br />
a panel visible and usable, while lesser weigths will preload<br />
after a random number of seconds between 2 and 10, so will load<br />
in the background after everything is started</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Plasma starts up correctly, applets load correctly and can be added<br />
correctly both those expanded or collapsed.<br />
plasmashell appears correctly usable without too big hiccups even<br />
while it's loading things in the background</p>
<p>some numbers:<br />
without preloading, plasma takes around 64 mb of memory after startup<br />
when preloading everything about 94, so it's a cost of about 30 mb<br />
which is not negligible.<br />
don't have precise timing, but if everything gets preloaded immediately,<br />
the time to get an usable desktop appears to be at least doubled,<br />
while the delayed preloading (except just a couple of applets) doesn't<br />
seem to have a big impact on the time needed to get an usable desktop</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>BRANCH</strong><div><div>mart/preload</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10512" rel="noreferrer">https://phabricator.kde.org/D10512</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/plasma/data/servicetypes/plasma-applet.desktop<br />
src/plasmaquick/appletquickitem.cpp<br />
src/plasmaquick/private/appletquickitem_p.h</div></div></div><br /><div><strong>To: </strong>mart, Plasma<br /><strong>Cc: </strong>plasma-devel, Frameworks, michaelh, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>