Hi,

after ario, ncmpc seems to be the second interactive client I'm aware
of to have "idle" support (mpdscribble has been using "idle" since
january, and we have added the "idle" command to mpc in august).  I
have just merged several patches into the git repository, which will
become ncmpc 0.16.  The code base needed quite a bit of refactoring
and cleanup to allow that change.

Here are some numbers, measured with "perf stat" on Linux 2.6.31.  The
clients were running for 60 seconds, connected to a MPD server which
was stopped.  There was no user input.

 ncmpc now:          3ms     3.7M instructions    7 context-switches
 ncmpc 1baf41:      16ms    25.9M instructions  246 context-switches
 ncmpcpp c03167:    23ms    34.9M instructions  314 context-switches
 gmpc bda5b9:      165ms   407.9M instructions  790 context-switches
 ario 4cc861:      313ms   776.7M instructions  577 context-switches
 ario 4cc861 idle: 305ms   756.7M instructions  375 context-switches
 pms 0.41:         587ms  1650.0M instructions  427 context-switches

The goal is not to wake up the CPU and the network unless it is really
needed.  This allows the kernel to page out both MPD and ncmpc - which
is not possible when the client wakes up MPD each second.

The second major advantage of "idle" is reduced latency: if one client
changes the volume, the other client will (practically) immediately
display the new value, not half a second later.  ncmpc "feels" much
snappier with "idle".  This is a big plus for users, because the
latency experienced on all MPD clients can be annoying.

Max

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to