mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Revert "NSearchableComboBox: add debouncing and visibility check to prevent CPU spikes"
This reverts commit e9859e07f5.
This commit is contained in:
@@ -93,25 +93,15 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
|
||||
// Debounce timer to prevent excessive filterModel calls
|
||||
Timer {
|
||||
id: filterDebouncer
|
||||
interval: 16 // ~60fps
|
||||
repeat: false
|
||||
onTriggered: filterModel()
|
||||
}
|
||||
|
||||
onSearchTextChanged: filterDebouncer.restart()
|
||||
onModelChanged: filterDebouncer.restart()
|
||||
onSearchTextChanged: filterModel()
|
||||
onModelChanged: filterModel()
|
||||
Component.onCompleted: filterModel()
|
||||
|
||||
// Watch for model content changes (e.g., async font loading)
|
||||
// Only when component is actually visible to avoid wasting CPU
|
||||
Connections {
|
||||
target: root.model
|
||||
enabled: root.visible && root.opacity > 0
|
||||
function onCountChanged() {
|
||||
filterDebouncer.restart();
|
||||
filterModel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user