I would like to ask why the examples given for the Yun do not care about memory consumption and runtime?
If you take a look here http://arduino.cc/en/Tutorial/Bridge
I wonder why the client instance is passed to the helper methods by copying it.
I would suggest YunClient* as argument type and passing &client.
Example code is usually not optimized for anything but clarity
I think that especially on the Yun one has to take more care because of the libraries eating up some memory.