Skip to content

Commit

Permalink
Load the system monitor screen on demand
Browse files Browse the repository at this point in the history
This reduces the total amount of QObjects when starting Neptune by about
3k/25%, and that's even with the not exactly cheap Qt 3D integration
enabled. This also considerably reduces idle load as the system monitor
triggers a huge amount of binding updates even while not being visible.

Change-Id: I2671239ac06f3a6f94a9021ed8fc62b4602c73d7
Reviewed-by: Dominik Holland <[email protected]>
  • Loading branch information
vkrause authored and Gagi2k committed Aug 26, 2016
1 parent b1786b2 commit ada06ff
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions sysui/Cloud/Settings/SettingsScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ UIElement {
SettingsService.unitSystem = "metric"
}
else if (titleText === "SYSTEM MONITOR") {
ApplicationManagerInterface.applicationSurfaceReady(systemMonitor)
systemMonitorLoader.active = true
ApplicationManagerInterface.applicationSurfaceReady(systemMonitorLoader.item)
}
}
}
Expand All @@ -82,8 +83,14 @@ UIElement {
visible: false
}

MainScreen {
id: systemMonitor
visible: false
Loader {
id: systemMonitorLoader
active: false
sourceComponent: Component {
MainScreen {
id: systemMonitor
visible: false
}
}
}
}

0 comments on commit ada06ff

Please sign in to comment.