From b5e0f47b802c2a2d8206ebce48ab86faf8a087ce Mon Sep 17 00:00:00 2001 From: Damocles Date: Wed, 15 Apr 2026 23:41:33 +0200 Subject: [PATCH 1/2] perf: replace always-on bargroup shadow with hover-only glow the MultiEffect shadow on every BarGroup was causing 8+ offscreen FBO renders on every bar redraw. now only activates on hover. --- modules/BarGroup.qml | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/modules/BarGroup.qml b/modules/BarGroup.qml index 9a344e5..d790a66 100644 --- a/modules/BarGroup.qml +++ b/modules/BarGroup.qml @@ -31,29 +31,10 @@ Item { implicitHeight: M.Theme.barHeight - 3 - _pad readonly property int _pad: 6 + property bool _hovered: false - // Shadow source — rendered offscreen, only its glow is visible - Rectangle { - id: shadowSource - anchors.fill: parent - color: "transparent" - border.color: root.borderColor - border.width: 1 - topLeftRadius: root._tlr - topRightRadius: root._trr - bottomLeftRadius: root._blr - bottomRightRadius: root._brr - visible: false - } - - MultiEffect { - source: shadowSource - anchors.fill: shadowSource - shadowEnabled: true - shadowColor: root.borderColor - shadowBlur: 1.0 - shadowVerticalOffset: 0 - shadowHorizontalOffset: 0 + HoverHandler { + onHoveredChanged: root._hovered = hovered } // Frosted base — semi-transparent so the bar background bleeds through @@ -104,7 +85,7 @@ Item { } } - // Visible border + // Visible border — glow on hover only Rectangle { anchors.fill: parent color: "transparent" @@ -114,6 +95,15 @@ Item { topRightRadius: root._trr bottomLeftRadius: root._blr bottomRightRadius: root._brr + + layer.enabled: root._hovered + layer.effect: MultiEffect { + shadowEnabled: true + shadowColor: root.borderColor + shadowBlur: 1.0 + shadowVerticalOffset: 0 + shadowHorizontalOffset: 0 + } } Row { From 7ddf13eb62cbc70b5e57c42261059c23ec5a4699 Mon Sep 17 00:00:00 2001 From: Damocles Date: Wed, 15 Apr 2026 23:42:47 +0200 Subject: [PATCH 2/2] perf: reduce nova-stats sysfs read frequency core frequencies now read every 2nd tick instead of every tick (halves per-core sysfs I/O). temperature reads moved to every 4th tick. cpu usage still sampled every tick via /proc/stat. --- stats-daemon/src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stats-daemon/src/main.rs b/stats-daemon/src/main.rs index b206397..838d32f 100644 --- a/stats-daemon/src/main.rs +++ b/stats-daemon/src/main.rs @@ -201,18 +201,21 @@ fn main() { let stdout = io::stdout(); let mut out = io::BufWriter::new(stdout.lock()); let mut prev: Vec = vec![]; + let mut freqs: Vec = vec![]; let mut tick = 0u64; loop { let t0 = Instant::now(); let curr = read_stat(); - let freqs = read_core_freqs(); + if tick.is_multiple_of(2) { + freqs = read_core_freqs(); + emit_mem(&mut out); + } emit_cpu(&mut out, &prev, &curr, &freqs); prev = curr; - if tick.is_multiple_of(2) { - emit_mem(&mut out); + if tick.is_multiple_of(4) { emit_temp(&mut out); }