Google Chrome 35.0.1916.153 (Official Build 274914) m
OS: Windows7 64bit
I seem to be experiencing issues that suggest wss secure websockets are much slower on Chrome than IE and Firefox. I've trawled around but cannot find any real info to confirm others see this behaviour. It seems particularly noticeable when using SSL.
In summary: I'm prototyping using a localhost C++ websocket server to send data to a webpage that is opened on the same machine. Some of this data will be binary image png frames.I cannot really stream video and use a video tag,as the latency/lag has to be minimum.
This has to be the secure wss version of websockets. Thus I'm currently using a self signed certificate that has been added to the Trusted Root Certification Authorities Certificate Store.
One of the potentially limiting factors is how much data throughput the websocket connection will give. Currently just for prototyping, I'm using mongoose as the server. The server doesn't seem to be the limiting factor, it seems to be Chrome wss websocket handling.
Tests on my high'ish spec dev machine just send data over the websocket. Currently I'm not trying to do anything with the actual data that is passed. Client sends a wss client->server string saying "pull". Server replies with wss server-client 1 Megabyte binary blob. Client replies with wss client-server string saying "pull". Server replies with wss server-client 1 Megabyte binary blob. ..and so on ...
Here are the number of 1 Megabyte binary frames I get per second, for both secure and unsecured websockets:
IE (v10) wss:120 ws:221
Firefox (v28) wss:65 ws:170
Chrome (v35) wss:17 ws:93
You can see that chrome wss performance seems very slow in comparison to the others. I've tried this on 3 computers with similar results. I've tried different blob sizes for 0.1 Megabyte to 100 Megabyte and this makes no real difference to actual data rate throughput. I've tried disabling Nagle's algorith. I've tried 127.0.0.1 instead of localhost.
My instinct is that it isn't the server, but I may be wrong. Has anyone any ideas on something that I may be missing, or how to progress? Can anyone confirm that this slow chrome wss performance is a known issue?
thanks in advance for any responses ...
Matt
..............................
Additional info #1:
I enabled '#enable-websocket-experimental-implementation', but it seemed to make no difference. I also tried the latest chrome canary build but this also seemed to make no difference.
..............................
Additional info #2:
More results testing using 2 sockets per client instead of 1, each on different websocket sub protocol. As above in cycles per second, with a 1 Megabyte binary frame.
IE(v10) : wss:120 ws:221 wss[2 websockets]:176
Firefox(v28) : wss:65 ws:170 wss[2 websockets]:59
Chrome(v35) wss:17 ws:93 wss[2 websockets]:18
IE seems to speed up significantly using 2 websockets. Firefox and Chrome don't.
..............................