575 karma · joined May 20, 2016
Every decision made, has been made from a performance perspective.
Thanks for giving your infinite enlightenment, after looking at my code for 10 minutes. I guess your 10 minutes of reading the code is infinitely much more valuable than my 3 months work on it?
Get over yourself.
"FEATURING THE FASTEST AND MOST RELIABLE REAL-TIME ENGINE"
Never mind the fact that one libuv tcp stream consumes more memory than one entire WebSocket in µWS...
This implementation is way, way more lightweight. And it assumes that the buffer being queued has a struct Message in its head, so it doesn't have to allocate a node - one memory allocation is therefore skipped.
Like mentioned, it works as an optional engine in Socket.IO, Primus & SocketCluser (in which it will be default in version 5).
No code change, swap when you feel lucky :P
Swap require('ws') with require('uws') and see how it works for your code, report any issues if you need them fixed.
Well, of course there is a 20-30x perf boost, 10-40x memory improvement compared to ws (as the benchmark table shows).