W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2014

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

From: Iñaki Baz Castillo <ibc@aliax.net>
Date: Mon, 9 Jun 2014 20:34:54 +0200
Message-ID: <CALiegf=Tfx2+yoTYxbpyn3Pe=v4g-wmF2-Zg4L2UuL-OdyVNhQ@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:59 UTC