New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization should be async #131
Comments
Ha, @ericz should be answering soon :P. |
NO I DO LIKE YOU.. Sorry I'm quite busy with the job these days so I'm slow On Tue, Dec 17, 2013 at 11:30 PM, Michelle Bu notifications@github.comwrote:
510-691-3951 |
Ü happy manvalls is happy!! Anyways, any thoughts about web workers? I'm currently dropping socket.io in favour of peerjs @ chatiku.com, so you'll see me around here in a regular basis btw |
+1, but definitely would need to benchmark it. |
When large files are being prepared to be sent the execution of the serialization will block the javascript event loop, making the page unresponsive.
In addition, when using unreliable datachannels you're assuming your data may arrive unordered, thus if the user sends a 10kB file while a 50MB one is being prepared the 10kB one should be sent right away, at least when using unreliable datachannels.
I can think of two solutions to this problem:
1- Replace function calls with setTimeouts
2- Use web workers
Web workers are the way to go imo, as nowadays even phones have more than one core. And if a browser supports webrtc, it will already have support for web workers.
PS someone tell eric I made a sizeof function for javascript, he isn't answering my emails - nobody likes me :(
The text was updated successfully, but these errors were encountered: