Network Transparency with Wayland
Gray intervals indicate the range of times during which the program is scheduled to run; orange, the time range needed for the to read out the full transfer contents; green, the time range needed for the to send the data transfer; and red, the time spent by worker threads compressing the buffer changed records needed by the following data transfer operation. While this application only updates a single image buffer at a time, for applications which maintain multiple windows, transfer latency can be reduced by writing each window’s buffer change transcript as soon as it is available, instead of bundling everything into a single large transfer. Finally, looking at microsecond-scale details, we can see that during a transfer between matching instances, the receiving program makes a large number of context switches to periodically check for (and one time, handle) new events from either pipes or a connected Wayland compositor or application, and then resume the nonblocking read operation.
Source: mstoeckl.com