This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Description
There are a few debug() calls in websocket.js that really slowed down our application. We have a high throughput of packets, and it turns out that sys.inspect() consumed almost 90% of the CPU time, which could be pinpointed down to these debug() calls.
Example:
debug('dataListener(' + sys.inspect(buf) + ')');
When we commented out these (for us) unnecessary calls, performance was substantially increased. I suppose you could create something like debugBuffer() and send buf as the argument. Inside the function you would then check the debug level before calling sys.inspect().