[Spice-devel] [PATCH spice-server 1/3] Relax conversion to RedChannel

Christophe Fergeau cfergeau at redhat.com
Mon Nov 7 16:30:57 UTC 2016


On Mon, Nov 07, 2016 at 11:13:21AM +0000, Frediano Ziglio wrote:
> Now RED_CHANNEL is a function call so avoid to call multiple
> time for the same conversion in the same functions.



> This speed up and reduce code and also reduce source line
> length.

To be honest, these are not really convincing arguments :)

Would quoting "35 insertions(+), 27 deletions", ie this adds lines of
code, be any useful whether deciding if this patch is good or not ? :)
This also adds a local variable, so more things to keep track of in our
limited brain while processing this code.
And potentially you could get into time of check/time of use races, ie
this check not triggering when it should.

For the record, I'm against doing this kind of changes unless there are
some profiling log showing this is causing a bottleneck.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161107/bf2223d3/attachment.sig>


More information about the Spice-devel mailing list