Message ID | 56051A42.8050902@kamp.de |
---|---|
State | New |
Headers | show |
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index dfc5139..4b384b0 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -228,6 +232,11 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) vnc_unlock_output(job->vs); goto disconnected; } + + if (qio_buffer_empty(&job->vs->output)) { + qio_buffer_move_empty(&vs.output, &job->vs->output); + } + The idea is that the vs->output is at the end of the queue and will be dropped by the next qio_buffer_move_empty anyway. So why not reuse it as worker thread output buffer? This reduces reallocs to zero for me after the initial transmission of the desktop.