Optimizations memory/cpu
- Only load bar widgets once the settings are done loading, and the widget is actually in use. - Only load bar on screens that request it, instead of hiding it.
This commit is contained in:
parent
38efdc8f36
commit
9fb4aff635
4 changed files with 86 additions and 83 deletions
|
|
@ -18,7 +18,7 @@ Item {
|
|||
id: loader
|
||||
|
||||
anchors.fill: parent
|
||||
active: enabled && widgetName !== ""
|
||||
active: Settings.isLoaded && enabled && widgetName !== ""
|
||||
sourceComponent: {
|
||||
if (!active) {
|
||||
return null
|
||||
|
|
@ -35,6 +35,7 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
Logger.log("NWidgetLoader", "Loaded", widgetName, "on screen", item.screen.name)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue