You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripte...@googlegroups.com
Hello team,
I'm facing some issues with sending WebSocket data at rate >= 1Mbps using emscripten_websocket_send_binary(). It appears that if I generate and send data at around rate >= 500 kbps and try to send it using WebSocket API, the entire UI thread start slowing down rendering to 0.1 FPS, as measured by executions latency of callbacks in emscripten_sync_run_in_main_runtime_thread() function. If sending of data is stopped, it immediately makes the UI more responsive as seen by quick execution of the callbacks.
For reference, speedtest shows ADSL uploads at 5.5 Mbps so I don't see how (and really, why) sending out data on UI thread should stall thread's processing so much so that any other callbacks in emscripten_sync_run_in_main_runtime_thread() starve for attention.
I'm using emscripten version 2.0.32.
Thanks,
Sarang.
Jukka Jylänki
unread,
Oct 25, 2021, 2:11:42 PM10/25/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripte...@googlegroups.com
What is the message size that you are sending with
emscripten_websocket_send_binary()? If it is relatively small, it is
good to benchmark the number of send events/second rather than the
number of bytes/second.
If the send size is large, would you have a self-contained test case
available that could be used to reproduce the issue in a lab
environment?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripte...@googlegroups.com
Message size 1200 bytes, called 100 times a second on a timer. There are other calls which happen via the main thread quite often but don't cause any such slowdowns.