Don't keep a full NetworkModel instance alive when it's not visible
ClosedPublic

Authored by apol on May 30 2019, 3:32 PM.

Details

Summary

This was implemented as an optimisation in Plasma at some point, where all full
representations are displayed at all times.
This would mean doing synchronous calls at start querying every wifi connection
we ever did and keeping the view fresh at all times.
This patch changes it so the networks model is only present when the full
representation is on display.

Test Plan

Tested by hand both with plasmoidviewer and a full plasmashell.

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.
apol created this revision.May 30 2019, 3:32 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 30 2019, 3:32 PM
Restricted Application added 1 blocking reviewer(s): jgrulich. · View Herald Transcript
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.May 30 2019, 3:32 PM

Will this delay the full representation's ability to quickly display the network list when opened?

apol added a comment.May 30 2019, 6:27 PM

Trying it locally I don't have the feeling that it's slower, networkmanager has the information internally after all.

jgrulich accepted this revision.May 31 2019, 6:19 AM
This revision is now accepted and ready to land.May 31 2019, 6:19 AM

Doesn't seem to have any impact on performance.

This revision was automatically updated to reflect the committed changes.