Remove that was spamming backend calls on playback
The (() => { if (outputStatus?.is_playing) loadStatus(); }) was
causing massive console spam ("spam masivo") that continued even after
removing mouse from badge.
Root causes:
1. was cherry-picked from feature/ui-fixes for badge auto-update
2. But now we have 1s polling that already keeps data fresh
3. outputStatus object was being mutated/recreated frequently
4. This triggered repeatedly, calling loadStatus()
5. Each loadStatus() enumerated 12 CPAL devices + PipeWire sinks
6. CPAL enumeration causes ALSA errors: "Cannot get card index for 0"
Previous commit (0c3ca16) removed loadStatus() from onmouseenter, but
spam continued because kept triggering during playback.
Solution:
- Removed completely (lines 150-156)
- loadStatus() now only called once on mount
- Polling interval (1s) only calls get_hardware_audio_status
- get_hardware_audio_status just reads /proc/asound (no device enumeration)
Result:
- Console spam eliminated completely
- Badge still updates every 1s via polling
- Zero CPAL/ALSA enumeration during playback
- Massive reduction in CPU/battery usage
This commit is contained in:
1 parent
0c3ca16550
commit
19a571dddc
1 file changed
-7
@@ -147,13 +147,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Reload status when playback starts
|
||||
$effect(() => {
|
||||
if (outputStatus?.is_playing) {
|
||||
loadStatus();
|
||||
}
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
loadStatus();
|
||||
|
||||
|
||||
Reference in new issue
Block a user