status: reduce wakeups with display_bitrate enabled
commitbbef713741473bc3f207dc5b6c252d7df7e38a44
authorRaghavendra D Prabhu <rprabhu@wnohang.net>
Sat, 8 Dec 2012 17:54:47 +0000 (8 23:24 +0530)
committerAndrzej Rybczak <electricityispower@gmail.com>
Sat, 6 Apr 2013 08:52:22 +0000 (6 10:52 +0200)
treeab7dc37ca4d05871f2ec2e0669dbbf10be544efd
parent419263b1b5be007c61f386a8490a0d322212f866
status: reduce wakeups with display_bitrate enabled

When system was profiled for wakeups, a high wakeup rate from mpd was observed even when paused. Strace-ing mpd pointed at excessive polling even though mpd_communication_mode is set to notifications. By method of elimination in the configuration, it was narrowed down to display_bitrate. By code inspection, it could be seen that Mpd.isPlaying() is true even if mpd is paused, but it doesn't make sense as to why bitrate needs to be constantly updated even when mpd is paused. Hence the patch.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
src/status.cpp