#471 closed enhancement (wontfix)
cursor improvements: send as picture, cache pixels client side
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | trivial | Milestone: | future |
Component: | core | Version: | |
Keywords: | Cc: |
Description
The cursor pixel data is in pre-multiplied argb format.
We could encode it with a picture encoder which will be a lot more efficient than lz4/zlib.
Also, if the client supports the feature, we could build up a cache of cursor pixels we have sent already and avoid re-sending those again, sending the unique ID of the cursor cache instead. (the cursor cache could be limited to a fixed number of cursor serial numbers to prevent growing too much).
Since cursor changes are fairly rare, the bandwidth savings would be very small - so this is a very low priority ticket.
Attachments (2)
Change History (5)
Changed 7 years ago by
Attachment: | png-cursors.patch added |
---|
comment:1 Changed 7 years ago by
Owner: | changed from Antoine Martin to Antoine Martin |
---|---|
Status: | new → assigned |
As the lz4 compression tests were very interesting (see r4925 and ticket:443#comment:4), I thought I would try to compare png and lz4 compression for cursors.
Using the png-cursors.patch, and starting an xterm then the "test custom cursor" test script, I found:
- using png encoder:
serial=2, pixels=<type 'str'>=9216 sent cursor as png: 745 bytes cursor compression took: 2.1439ms serial=10, pixels=<type 'str'>=16384 sent cursor as png: 346 bytes cursor compression took: 2.4788ms
- with lz4:
serial=2, pixels=<type 'str'>=9216 sent cursor as: LevelCompressed(cursor: 549 bytes as zlib/5) cursor compression took: 1.0080ms serial=10, pixels=<type 'str'>=16384 sent cursor as: LevelCompressed(cursor: 177 bytes as zlib/5) cursor compression took: 0.9391ms
So lz4 compresses a lot better than png, and takes half the time to do it!
That is just incredibly efficient. This patch will not be merged, and lz4 is likely to be used in places where we currently prefer png (after further tests).
Caching cursors could still be a win, so I am keeping this ticket opened.
Changed 7 years ago by
Attachment: | png-cursors.2.patch added |
---|
adds ability to send cursors compressed with png if client supports it - records compression timing
comment:2 Changed 7 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Recent changes have brought more generic support for compression, including lz4 compression of cursors.
Compressed cursors are already so small that I don't see any point in complicating things with cursor caching.
comment:3 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/471
adds ability to send cursors compressed with png if client supports it