summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2010-08-26 10:22:29 -0500
committerJoel Martin <github@martintribe.org>2010-08-26 10:22:29 -0500
commit67b4e9879a0dc223dd0dfd8dce2392d4341aa5ff (patch)
tree04f99ba3897dcbf015760be1457c468c83f1dfe1 /tests
parentfb007628d68b401fa25fb0f308fc46585274bdee (diff)
downloadwebsockify-67b4e9879a0dc223dd0dfd8dce2392d4341aa5ff.tar.gz
Indexed receive queue. Up to 2X speedup in Chrome.
Generally, most servers send hextile updates as single updates containing many rects. Some servers send hextile updates as many small framebuffer updates with a few rects each (such as QEMU). This latter cases revealed that shifting off the beginning of the receive queue (which happens after each hextile FBU) performs poorly. This change switches to using an indexed receive queue (instead of actually shifting off the array). When the receive queue has grown to a certain size, then it is compacted all at once. The code is not as clean, but this change results in more than 2X speedup under Chrome for the pessimal case and 10-20% in firefox.
Diffstat (limited to 'tests')
-rw-r--r--tests/cursor.html11
-rw-r--r--tests/vnc_playback.html2
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/cursor.html b/tests/cursor.html
index 81fba82..867b55d 100644
--- a/tests/cursor.html
+++ b/tests/cursor.html
@@ -45,6 +45,17 @@
var ANDsz = w * h * 4;
var XORsz = Math.ceil( (w * h) / 8.0 );
+ // Push multi-byte little-endian values
+ arr.push16le = function (num) {
+ this.push((num ) & 0xFF,
+ (num >> 8) & 0xFF );
+ };
+ arr.push32le = function (num) {
+ this.push((num ) & 0xFF,
+ (num >> 8) & 0xFF,
+ (num >> 16) & 0xFF,
+ (num >> 24) & 0xFF );
+ };
// Main header
arr.push16le(0); // Reserved
diff --git a/tests/vnc_playback.html b/tests/vnc_playback.html
index 06de837..5f3af41 100644
--- a/tests/vnc_playback.html
+++ b/tests/vnc_playback.html
@@ -1,6 +1,6 @@
<html>
<head>
- <title>VNC Test</title>
+ <title>VNC Playback</title>
<link rel="stylesheet" href="include/plain.css">
</head>
<body>