hein created this revision. hein added reviewers: Plasma, Frameworks, davidedmundson. Restricted Application added projects: Plasma, Frameworks.
REVISION SUMMARY KNotificationManager always instanciates all of its built-in plugins as well as any externally supplied icons as soon as the first notification is sent, even if a particular plugin is not actually needed by the notification. This means e.g. always instanciating a text-to-speech engine even if a notification event doesn't have TTS on (as basically none do by default), or for that matter loading Phonon even when sounds are off. This patch implements a lazy-loading approach instead. With the patch applied, e.g. Konversation with default config will only ever instanciate the Taskbar plugin, as its notification events only enable this action by default. The patch also speeds up time from login screen to desktop, by way of the NetworkManager kded plugin not causing those costly instanciations with its very early notification events anymore. As a bonus, the patch also fixes a bug: The old code never properly supported runtime installation of new plugins. If a plugin were to be installed at runtime and enabled by the user in the config UI, it likely never would have been instanciated if a preceding notification had already caused the one and only instanciation pass by that time. TEST PLAN Tests pass. REPOSITORY R289 KNotifications BRANCH master REVISION DETAIL https://phabricator.kde.org/D9165 AFFECTED FILES src/knotificationmanager.cpp src/knotificationmanager_p.h To: hein, #plasma, #frameworks, davidedmundson Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart