Closed Aerion closed 2 years ago
Awesome. I've roughly measured the performant effect and you can actually see it. When generating lots of events (mainly increasing or decreasing the volume rapidly), htop reports 8-9% CPU load with the previous implementation. Now it's always under 2%.
Props for the idea! Merging once CI runs, thanks again.
With multiple occurrences of pulseaudio-control started, I noticed that on quick changes (i.e. volume or iterating through the sinks), the cpu usage increased a lot for the action.
pactl is quite noisy, and a single event can generate multiple matching lines.
This commit reduces the calls to output to one per 100ms.