ephyr: Sync less in hostx_paint_rect
Move the xcb_aux_sync into the shm path, where we do still need it to
synchronize access with the host. In the non-shm path the image is
copied to the host anyway so the sync just adds latency and keeps you
from using all your network bandwidth.
Only the non-shm-putimage path benefits from this, but the benefit is
significant even on the local machine (here a 3.2GHz Core i7-8700, using
XEPHYR_NO_SHM=1):
before after Operation
------------ -------------------- -------------------------
228000000.0 225000000.0 (0.987) Dot
40900000.0 41600000.0 (1.017) 1x1 rectangle
10400000.0 10700000.0 (1.029) 10x10 rectangle
477000.0 471000.0 (0.987) 100x100 rectangle
30900.0 31800.0 (1.029) 500x500 rectangle
760000.0 981000.0 (1.291) PutImage 10x10 square
14700.0 19200.0 (1.306) PutImage 100x100 square
320.0 382.0 (1.194) PutImage 500x500 square
749000.0 984000.0 (1.314) ShmPutImage 10x10 square
268000.0 304000.0 (1.134) ShmPutImage 100x100 square
16600.0 18500.0 (1.114) ShmPutImage 500x500 square
Reviewed-by:
Emma Anholt <emma@anholt.net>
Loading
Please register or sign in to comment