vnc: recycle empty vs->output buffer
commitc3d6899c5e67dfd7ff195eccc10541f3b7e141a7
authorPeter Lieven <pl@kamp.de>
Fri, 30 Oct 2015 11:10:11 +0000 (30 12:10 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Nov 2015 08:09:31 +0000 (5 09:09 +0100)
treea1564cd0a9d2f84534015461af4ec32e43d3a0ab
parent2e0c90af0a33451498d333d72c06e5429c7cd168
vnc: recycle empty vs->output buffer

If the vs->output buffer is empty it will be dropped
by the next qio_buffer_move_empty in vnc_jobs_consume_buffer
anyway. So reuse the allocated buffer from this buffer
in the worker thread where we otherwise would start with
an empty (unallocated buffer).

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1446203414-4013-17-git-send-email-kraxel@redhat.com

[ added a comment describing the non-obvious optimization ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc-jobs.c