I've got a very bloated websocket client that listens to a few dozen different websocket channels from different domains... it is pretty fast but I'd like to optimize it as much as possible.Basically each websocket client:listens for messagesparses those messages into usable datastores that data in a global object that a ticker function then gobbles up and further processes once per secondIt's working relatively OK single threaded as the messages are small and infrequent, but occasionally there is a flood of messages from all websocket servers which slows down the entire script significantly and I'd like to eliminate that bottleneck.If somebody could explain the basics or even provide some sample code as to how a master process would launch multiple child processes and then query those child processes once per second for the data they have all parsed from their messages, I would greatly appreciate that!Thank you!
Submitted April 22, 2020 at 03:44PM by grumpyThrifter
No comments:
Post a Comment