What is the frequency of updateAnimationForMessage? If it’s running something like requestAnimationFrame and you’re pushing an event from there the event is hitting the server at least 60 times a second (more in high refresh rate monitors), which for 200 users would be 12000 events a second that the server has to handle, which would explain the memory use.
I agree with @ibarch, you probably should figure out a way to decouple the animation from the roundtrips to the server.
If it is only running a single time the problem isn’t in the javascript and we would need more info about your problem to figure out where the bottleneck is.






















