xpra icon
Bug tracker and wiki

Opened 7 months ago

Closed 2 months ago

#1424 closed task (fixed)

html5: faster network layer, input devices, etc

Reported by: Antoine Martin Owned by: alas
Priority: major Milestone: 2.0
Component: html5 Version: trunk
Keywords: Cc:

Description

Follow up from #1341.

Video / paint:

  • either fix broadway, or get native video decoding to play properly without buffering too much
  • process_interval should not be hardcoded?

Network layer:

  • onmessage should not copy bytes at a time (see ticket:1341#comment:12)
  • less wasteful process_xxxx_queue" timers scheduling
  • process_receive_queue should not use recursion

Input devices:

  • throttle tablet input events / #1390

Attachments (5)

test-slow-send.patch (659 bytes) - added by Antoine Martin 6 months ago.
make it easier to test slow network and packet aggregation in client receiver code
html5-zerocopy.patch (7.9 KB) - added by Antoine Martin 6 months ago.
implement zero copy in network layer - only aggregate chunks if we have to, do it using fast set method
html5-timers-managed.patch (2.9 KB) - added by Antoine Martin 6 months ago.
try to manage the timers and only use them as needed - actually makes things slower
html5-timers-managed-v2.patch (1.9 KB) - added by Antoine Martin 6 months ago.
alternative implementation of managed timers
html5-clipboard.patch (10.3 KB) - added by Antoine Martin 6 months ago.
two-way clipboard

Download all attachments as: .zip

Change History (10)

Changed 6 months ago by Antoine Martin

Attachment: test-slow-send.patch added

make it easier to test slow network and packet aggregation in client receiver code

Changed 6 months ago by Antoine Martin

Attachment: html5-zerocopy.patch added

implement zero copy in network layer - only aggregate chunks if we have to, do it using fast set method

Changed 6 months ago by Antoine Martin

Attachment: html5-timers-managed.patch added

try to manage the timers and only use them as needed - actually makes things slower

Changed 6 months ago by Antoine Martin

alternative implementation of managed timers

comment:1 Changed 6 months ago by Antoine Martin

Status: newassigned
  • r15183 merges the zero copy code (and removes some unused variables, more removed in r15185)
  • r15184: don't queue draws, r15187: lower timer delay

We could also modify process_receive_queue to only parse the "packet size", "packet flags" and "padding" when we get the full 8-byte header - small saving which would make the code harder to read. meh.

With these changes, testing with glxspheres at high res, the throughput and framerate are increased - but really not by much. And this is even more wasteful than before (running the timers at full speed), so r15188 switches to "on-demand" timers. (also a bit slower?)

Big question: how can we validate those changes better? We need reliable performance data to compare before and after, preferably using a real-world use case (not glxgears / glxspheres).. As some of these changes may actually make things worse.

Last edited 6 months ago by Antoine Martin (previous) (diff)

Changed 6 months ago by Antoine Martin

Attachment: html5-clipboard.patch added

two-way clipboard

comment:2 Changed 6 months ago by Antoine Martin

  • moving clipboard to its own ticket: #1461
  • we try to clamp the windows to the browser's window area, but allow the user to move part of the window "off-screen" if they wish: r15241 - but there's a bug in the "draggable window" code, which is reporting coordinates out of range... and they get more and more out of range as we clamp the window, something is not getting updated somewhere

comment:3 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew
Summary: html5: use video, faster network layer, input devices, etchtml5: faster network layer, input devices, etc

@afarr: since we don't have a reliable way of measuring performance, I'm not sure there's anything here for you to test - feel free to close as FYI. (just bear in mind that the scrolling paint code still looks buggy with the html5 client: #1432?)

Last edited 6 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 5 months ago by Antoine Martin

  • r15275 fixes scroll paint (r15277 for v1.0.x)
  • r15276 adds "paint box" debugging, enabled with debug mode (same code and colors as #760 "XPRA_OPENGL_PAINT_BOX")

comment:5 Changed 2 months ago by J. Max Mena

Resolution: fixed
Status: newclosed

Noted and closing.

Note: See TracTickets for help on using tickets.