WebSocket performance in Chrome (problem)

29 views
Skip to first unread message

vgorin

unread,
Apr 9, 2012, 7:45:26 AM4/9/12
to Chromium HTML5
Hi there,

I'm making a very simple test for downloading binary data through
WebSocket using Google Chrome 18.0.1025.151 m.
Client sends a request to server (both client and server are hosted on
localhost):
var connection = new WebSocket("ws://localhost:8008/get");
connection.onopen = function(connectedOk) {
console.time("Exec-1");
connection.send("/path/to/my/10mb/file");
};

And receives a single binary 10mb WebSocket frame back:
connection.onmessage = function(message) {
console.timeEnd("Exec-1");
};

Everything works fine, but the operation takes 5950ms (!) to perform.
The same round trip takes only 217ms in Firefox 11.0
Chrome is taking 99% CPU during operation.

What can be wrong here? Any ideas how to make it run fast in Chrome?
Please help!
Thanks.
Reply all
Reply to author
Forward
0 new messages