Interesting Balisage paper on JSON vs. XML performance in the browser

David Lee has written an interesting analysis of JSON vs. XML performance. 
There's lots of detail and (seamingly) very careful measurements.  From the 
conclusion section:

"Given the same document object, one can produce nearly identical sized 
JSON and XML representations. Network transfer speed is directly related to 
the document size so is unaffected by the markup given similar size. 
Compressed documents in all formats even very "Fat" representations of JSON 
or XML compress to nearly identical size which is an indicator that they 
contain approximately the same entropy or information content and 
transferring these documents to a wide variety of devices takes effectively 
the same time per device. Parsing speed varies on the technique used. Pure 
JavaScript parsing generally performs better with XML then with JSON but 
not always, while Query speed generally is faster for JSON, but again, not 
always. Overall using native JavaScript the use of XML and JSON is 
essentially identical performance for total user experience (transfer plus 
parse plus query), however use of the popular JavaScript library jQuery 
imposes a steep penalty on both JSON and XML, more-so for XML. [4]"

The whole paper is well worth reading IMO.

Noah


[1] 
http://www.balisage.net/Proceedings/vol10/html/Lee01/BalisageVol10-Lee01.html

Received on Monday, 12 August 2013 01:23:20 UTC