Blog Archives

Parsing Sucks

The developers of Hipmunk posted a recent blog article detailing their post-mortem thoughts on the creation of their iPhone client.  It’s a good read top-to-bottom, but I thought the most interesting bit was regarding the performance and data transfer between the Hipmunk servers and the client.  This quote I think sums it up aptly:

Parsing large amounts of JSON sucks.

I think that can hold true whether you’re talking about JSON or XML. In fact, I find that parsing a given XML feed into business objects eats up a sizable chunk of time on any project. Their solution was to send compiled plists rather than big chunks of JSON, which cut the import time down by more than an order of magnitude. Not too shabby.

Compiling a plist server side doesn’t seem to be as big of a chore as you’d think. In fact, there’s a github project that will do the server side compilation for you. We have a couple of end-to-end products developed here at Mindgrub that we’re going to look at implementing using compiled plists over the XML we’re using now.

Advertisements