Skip to content

Performance

locainin edited this page Apr 20, 2026 · 6 revisions

Performance

This page lists configuration and workflow choices that reduce CPU and wakeups.

Prefer built-ins

Built-in widget readers (builtin:*) avoid external processes and are cheaper than shell commands. Prefer built-ins for CPU, memory, battery, and network stats.

Use watch commands

Long-running watch_cmd entries (for volume, Wi-Fi, Bluetooth, rfkill) update widgets on events and reduce polling. When a watch command is unavailable, the widget falls back to polling.

Media marquee cost

Long media titles scroll with a marquee effect, which triggers periodic redraws. If lower idle CPU is preferred, either increase the title threshold or disable the media widget entirely:

[media]
title_char_limit = 48
enabled = false

Media metadata retries are bounded per player, so delayed metadata updates should not accumulate unbounded background retry tasks under bursty player signals.

The newer media shell knobs can also reduce work:

[media]
show_art = false
show_navigation = false
title_char_limit = 48
  • hiding art avoids artwork decode and texture updates
  • hiding player navigation removes extra buttons and width pressure
  • a larger title_char_limit reduces marquee redraws
  • smaller art_size_px, content_spacing_px, and navigation_spacing_px help tighter panels stay within their requested width with less CSS pressure

Remote browser artwork is disabled by default. Turning on:

[media]
remote_art_policy = "browsers_too"

allows browser media sessions to fetch remote https artwork too, which improves visuals but increases network activity and trust in webpage-controlled metadata.

Increase refresh intervals

For lightweight dashboards, increase refresh intervals:

[widgets]
refresh_interval_ms = 2000
refresh_interval_slow_ms = 6000

Panel profiling

unixnotis-center also exposes an opt-in runtime probe for panel-open and steady-state churn:

UNIXNOTIS_PERF_PROBE=1 noticenterctl open-panel --debug verbose

This is meant for profiling sessions, not normal daily use.

When enabled, the center logs structured snapshots around:

  • panel open
  • a short settled window after open
  • panel close

The probe is useful for spotting:

  • refresh timers that keep firing after the panel settles
  • watch-driven churn that keeps reapplying widget state
  • marquee activity that continues to redraw while visible

Use it alongside perf, flamegraph, or repeated branch-to-branch runs when tracking down CPU usage during animated panel opens.

Prefer simple commands

Simple commands run directly and avoid shell overhead. Use sh -c only when a pipeline is required.

Disable unused widgets

Disable widgets that are not needed:

[widgets.volume]
enabled = false

[widgets.brightness]
enabled = false

Clone this wiki locally