The problem with gtkperf
is that it creates thousands of windows, and destroys them before we get a chance to paint them, this causes too many new-window
packets to be queued up, too many damage requests to clog up the encoding queue, all of it for mostly nothing. (see also #232)
We should be able to detect when we have too many short-lived windows and start delaying things by a few milliseconds, which should be enough for the window to get closed before we bother with all the expensive actions.
This is one of the very rare cases where older protocols like VNC still do better, because they do not have to worry about windows, just pixels, which makes things so much easier.
We can't delay things in the server class which needs to keep track of things at all times, so this has to be done per-client in the server source class.
make_window_source
is called from:
damage
: we could just keep a list of pending damages events, and process them when we eventually get around to making the window source
new_window
via send_window_icon
: this one can be delayed a bit if we need to
set_client_properties
: is this even needed here? This should not fire until we've sent the window.
Re-scheduling.
We should not care too much about pathological cases like these, it makes us look good on benchmarks but that's all.
Works well enough for me!
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/505