Tag Archives: donut

Benchmarking JSON vs XML Parsing in Android revisited

In my previous post on this I mentioned that parsing the Google Reader XML (Atom) feed with SAX was faster than parsing the JSON stream with json-simple. However, this is no longer the case thanks to jackson which is used in the Reader Widgets from version 2.3.
On my HTC G1 running Android 1.6 (donut) it takes an average of 157 millisecs to parse and store a single headline. For SAX it takes 207 millisecs. This means about a 24% overall speed improvement in processing headlines from V2.2 to V2.3. Also, as mentioned before, the amount of data downloaded is also about 25% less for JSON.

It has always annoyed me that the large widget wasn’t using the JSON stream for headlines and now that it is I’m much happier!
Big thanks to Tatu over at Codehaus for handling invalid JSON strings that cropped up in my Google Reader stream (jackson 1.4.)

Senseless Sense

Don’t get me wrong I love my HTC Hero and it’s Sense UI. I just don’t like the fact I have to wait longer for Android updates compared to other phones. I’m sure when Eclair comes to the Hero it will be great but I just can’t stand missing out on all the new apps that have come out for 1.6 and above like Google Goggles and the new Maps. I can try them out on my G1 with Donut but I’m not lugging that around with me too.

By the way, I just updated my Hero to Modaco 3.0 and it feels a bit faster.

I think my next phone will be a stock Android 2.x device, perhaps the Nexus One that’s been causing such a storm. That way I can get updates much faster.

Android 1.6: still no animated GIF support

I was just playing around with my newly updated G1 and realised that animated GIFs still do not animate on it. This has been an Android bug since day 1 in both the browser and ImageView. If you visit a web page containing an animated GIF all you will see is the first frame and nothing else. This annoyed me a bit when it was in 1.5 (cupcake) but the fact that its still in 1.6 (donut) is amazing. Android users may have noticed that ads in apps downloaded from the market are just static images and/or text. The Adfonic ads in my Reader Widget Small app are text only because of this bug. I can’t believe that Google, a company built by ad money, has let this one slide for so long. Animated GIF ads can be annoying but to leave developers without the option to use them is very restrictive. Rant over.