According to this question: (Socket.io: How to limit the size of emitted data from client to the websocket server), you can roughly calculate the size of packets by turning the data into a JSON string and finding the length of it.
Wouldn't that mean that, for instance, the number 12345678 takes just as many bytes as the string "12345678", even though one is a string and one is a number?
Also, does that mean that rounding numbers would decrease size? So, instead of 3.49362627, you could send 3.5.
Would decreasing the length of property tags improve size too? Instead of: {width: 4}, you could {w: 4}.
Thank you help with understanding the size of packets sent by socket.io. Any other general optimization tips are appreciated.