El lado del cliente de Socket.io provoca un alto uso de la CPU

I am running a simple websocket chat application in NodeJS and socket.io and when connected to the server from a browser, the CPU usage on the client machine goes up easily 10x...

How would I go about debugging CPU usage on the client side?



preguntado el 27 de noviembre de 13 a las 05:11

1 Respuestas

Woops! turns out this was because the chat was getting filled up with messages that were each updating a relative date every 3seconds. Solution: delete oldest messages from the DOM to stop date updating 100's of messages every few seconds :D

respondido 27 nov., 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.