<table><tr><td style="">hein created this revision.<br />hein added reviewers: Plasma, Frameworks, davidedmundson.<br />Restricted Application added projects: Plasma, Frameworks.
</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/D9165" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>KNotificationManager always instanciates all of its built-in plugins<br />
as well as any externally supplied icons as soon as the first<br />
notification is sent, even if a particular plugin is not actually<br />
needed by the notification.</p>

<p>This means e.g. always instanciating a text-to-speech engine even if<br />
a notification event doesn't have TTS on (as basically none do by<br />
default), or for that matter loading Phonon even when sounds are off.</p>

<p>This patch implements a lazy-loading approach instead. With the<br />
patch applied, e.g. Konversation with default config will only ever<br />
instanciate the Taskbar plugin, as its notification events only<br />
enable this action by default.</p>

<p>The patch also speeds up time from login screen to desktop, by way<br />
of the NetworkManager kded plugin not causing those costly<br />
instanciations with its very early notification events anymore.</p>

<p>As a bonus, the patch also fixes a bug: The old code never properly<br />
supported runtime installation of new plugins. If a plugin were to<br />
be installed at runtime and enabled by the user in the config UI,<br />
it likely never would have been instanciated if a preceding<br />
notification had already caused the one and only instanciation pass<br />
by that time.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tests pass.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R289 KNotifications</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/D9165" rel="noreferrer">https://phabricator.kde.org/D9165</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/knotificationmanager.cpp<br />
src/knotificationmanager_p.h</div></div></div><br /><div><strong>To: </strong>hein, Plasma, Frameworks, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>