Save unneeded DBus roundtrip
ClosedPublic

Authored by nicolasfella on Apr 9 2020, 8:57 AM.

Details

Summary

When the module is loaded the handler is notified over DBus just to go back to the module to init it. Skip the roundtrip and init directly.

Test Plan

Restarted plasmashell and kded5. (dis)connected wifi. Got notifications about it

Diff Detail

Repository
R116 Plasma Network Management Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Apr 9 2020, 8:57 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 9 2020, 8:57 AM
Restricted Application added a reviewer: jgrulich. · View Herald Transcript
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Apr 9 2020, 8:57 AM
broulik added a subscriber: broulik.Apr 9 2020, 8:59 AM

Isn't that Handler also used from the plasmoid and KCM, which is in a separate process from kded?

Isn't that Handler also used from the plasmoid and KCM, which is in a separate process from kded?

It is.

Yes, but I don't see this being a problem

Yes, but I don't see this being a problem

I think this was done this way to make the kded module used only when either the applet or KCM is running. It was Lukáš Tinkl who implemented at the beginning of Plasma 5 so I don't really remember the details. Part of this was also done for https://bugs.kde.org/show_bug.cgi?id=338513.

Actually it was me who pushed this, Lukáš just did some changes to it.

Here are some details: https://cgit.kde.org/plasma-nm.git/commit/?id=81839a1566d0c0209a308d71b03837f996a19c96

I see, that makes sense

I see that we already initialize the secret agent right when the kded module is loaded, but I see a potential problem in showing a notification using a fallback backend (the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet.

I see, that makes sense

Actually we already initialize the secret agent right when the kded module is loaded, but I see a potential problem in showing a notification using a fallback backend (the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet, because NetworkManager might be trying to activate a connection before Plasma starts.

(the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet

Plasma ships a trick for that which means that we always get plasma notifications when plasma is installed regardless of if it's running.

jgrulich accepted this revision.Apr 9 2020, 9:32 AM

(the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet

Plasma ships a trick for that which means that we always get plasma notifications when plasma is installed regardless of if it's running.

Ok. With this I believe it should be safe to push this.

This revision is now accepted and ready to land.Apr 9 2020, 9:32 AM
This revision was automatically updated to reflect the committed changes.