-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New commands outputlist and output #2147
Conversation
4279449
to
fc93511
Compare
- `outputlist` is a more compact version of the outputs command that does not print attributes. - `output {ID}` prints the details of specified output id. Clients usually prints a list of outputs and after the user selects an output, it shows the details.
fc93511
to
71601b8
Compare
What is the purpose of these two new commands? |
Clients usually prints a list of outputs and after the user selects an output, it shows the details. This new commands reduces the protocol overhead and simplifies client implementation of handling outputs. |
Does it really reduce protocol overhead? For your workflow, you need two commands instead of one, i.e. doubles the number of round trips, for something that usually fits into a single TCP PDU (unless you mean monster MPD installations with dozens or hundreds of outputs). Now you have two PDUs instead of one; smaller PDUs, but PDU sizes don't matter a lot. Twice the number of PDUs and twice latency is what matters much more than PDU size. |
I have users with dozens of mpd outputs
Only if the user really want to show the details of an output. The usual usage is to list the outputs with its type and enabled status. More details are only required if the user want to see the attributes or want to modify an attribute. This is in my workflow a second step. With current implementation:
With my implementation:
|
Step 3 is superfluous because your client has the data already. You only need to discard that response and repeat the command if you receive an "output" idle event.
That's 104 bytes. Let's say you have a dozen ALSA outputs, each with the overhead for those two dummy attributes (which we could/should omit if there's nothing useful), we're at 1040 bytes. That's well below the MTU. Since we're comparing with your approach of using two PDUs, we have a budget of more than 2800 bytes. You'd need 27 outputs to exceed the size of two PDUs; i.e. only users with 27 outputs or more would benefit from your optimization, at the cost of degrading performance for the 99.9% of all other MPD users (those who have less than 14 outputs). |
outputlist
is a more compact version of the outputs command that does not print attributes.output {ID}
prints the details of specified output id.