3 ms·
> And that the latency gets worse if you're making the mistake of using XML as your on the wire format... No it doesn't. That's not what latency is.
by goldbrick 11y ago
> And that the latency gets worse if you're making the mistake of using XML as your on the wire format...
No it doesn't. That's not what latency is.
- btilly 11y agoNot always, granted, but the format really can matter. Grabbing a random benchmark, look at http://www.maxondev.com/serialization-performance-comparison-c-net-formats-frameworks-xmldatacontractserializer-xmlserializer-binaryformatter-json-newtonsoft-servicestack-text/ http://www.maxondev.com/serialization-performance-comparison.... It is in C#, but every language is going to give similar results. An efficient on the wire format like protocol buffers is a bit faster and a bit smaller than a sane text format like JSON. But XML is several times slower and several times bigger. He didn't test pretty-printing the XML, but that makes it several times slower and bigger still than plain XML. This adds up sooner than you'd think. For a start there is a noticeable timing difference between an RPC call that fits in one packet and one that has to be split across two. If you've got an application that spends a sizable portion of its time in serialization/deserialization, it is obvious that the format chosen will affect maximum throughput. (Many distributed applications spend most of their CPU time doing those two things.) It is harder for the format to have a noticeable impact on latency, but it both can and I've seen it happen.