xpra icon
Bug tracker and wiki

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#68 closed enhancement (fixed)

improve performance of network code: bencoder is too slow

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.2
Component: server Version:
Keywords: Cc:

Description

First, eventually we can drop compatibility with old clients (see #57) and just assume that the client will always be sending the size header (introduced in r207, stable as of r270).

Second, the bencoder code uses recursion far too much (see #64 - crashes on OpenBSD) and is made hard to understand by the fact that it was tweaked to be able to deal with incomplete packets (which is no longer needed). Either we replace it with something better (surely there are other/better ones?) or at least we remove the cruft.

Attachments (3)

xpra-rawpackets.patch (11.4 KB) - added by Antoine Martin 8 years ago.
experimental patch which sends all strings larger than 1KB as raw packets
xpra-rawpackets-v2.patch (15.6 KB) - added by Antoine Martin 8 years ago.
new raw_packets feature with per-packet compression option (disabled for raw packets)
STATS-xpravnc-core2duo-raw8-rawpackets.csv (6.5 KB) - added by Antoine Martin 8 years ago.
compares current 0.3.1 code with raw_packets=False vs True, 0.2.0, 0.1.0 and 0.0.7.36

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by Antoine Martin

Milestone: 0.10.2
Status: newaccepted

would be good to get this in 0.2 to reduce cpu consumption (zero copy) on both client and server

comment:2 Changed 8 years ago by Antoine Martin

also, we should not try to re-compress pixel data when it was already compressed with x264/vpx/jpeg or png. It only makes sense to compress rgb24

Changed 8 years ago by Antoine Martin

Attachment: xpra-rawpackets.patch added

experimental patch which sends all strings larger than 1KB as raw packets

Changed 8 years ago by Antoine Martin

Attachment: xpra-rawpackets-v2.patch added

new raw_packets feature with per-packet compression option (disabled for raw packets)

comment:3 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

"raw_packets" feature merged in r784:

  • we send binary data without bencoding it
  • we can set compression per-packet (and avoid compressing pixels again)

comment:4 Changed 8 years ago by Antoine Martin

The code is now even more messy than before (despite the addition of docstrings), #122 will eventually clear this up.

Changed 8 years ago by Antoine Martin

compares current 0.3.1 code with raw_packets=False vs True, 0.2.0, 0.1.0 and 0.0.7.36

Note: See TracTickets for help on using tickets.