Hacker News new | ask | show | jobs
by ahoka 957 days ago
Most applications read JSONs from networks, where you have a stream. Buffering and fiddling with the whole request in memory increases latency by a lot, even if your JSON is smallish.
2 comments

Most(most) JSON payloads are probably much smaller than many buffer sizes so just end up all in memory anyway.
On a carefully built WebSocket server you would ensure your WebSocket messages all fit within a single MTU.