perf: gate cpuCores rebuild behind coreConsumers counter; 30s grace timer + history clear in SystemStats
This commit is contained in:
parent
f5e076c7ac
commit
9fa2a72a0b
2 changed files with 38 additions and 12 deletions
|
|
@ -32,6 +32,18 @@ M.BarSection {
|
|||
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
|
||||
readonly property bool _showPanel: _anyHover || _pinned
|
||||
|
||||
property bool _coreConsumerActive: false
|
||||
|
||||
on_ShowPanelChanged: {
|
||||
if (_showPanel && !_coreConsumerActive) {
|
||||
_coreConsumerActive = true;
|
||||
M.SystemStats.coreConsumers++;
|
||||
} else if (!_showPanel && _coreConsumerActive) {
|
||||
_coreConsumerActive = false;
|
||||
M.SystemStats.coreConsumers--;
|
||||
}
|
||||
}
|
||||
|
||||
property M.ProcessList _procs: M.ProcessList {
|
||||
sortBy: "cpu"
|
||||
active: root._showPanel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue