DataChannel.send() blocks for some milliseconds, how is it possible?

Hi,

I've realized, by measuring DataChannels performance in a JS
application, that in certain circumstances (network conditions?)
DataChannel.send() blocks for 1ms, 2ms or even 10ms. Tested in Chrome
35.

This is obviously catastrophic for a JS application since it blocks
the JS loop, and it is even worse given that existing periodic timers
(window.setInterval) get their next tick delayed the number of
milliseconds it took to DataChannel.send() to return.

I assume this cannot be valid and thus it is an implementation bug. Am
I right? or must I assume that send() may, not just fail, but also
block the JS execution loop?

Thanks a lot.

-- 
Iñaki Baz Castillo
<ibc@aliax.net>

Received on Monday, 9 June 2014 18:35:42 UTC