1

I am currently using the TouchJSON library in my iOS app. I currently deserialize JSON on the main thread and this seems to work well. The Earthquakes XML example in the iOS Developer Library demonstrates XML parsing on a secondary thread and I'm wondering if this would be a good idea for deserialization from JSON as well? My JSON objects are small so it seems unnecessary. What do you think?

VaVaVoom
  • 13
  • 3
  • Test on the slowest device you support (e.g. the original iPhone for iOS 3+, iPhone 3GS for iOS 4+) and see if performance is an issue. The most likely place where you'll notice this is while scrolling a table view -- if deserialization takes more than say 50 ms, you'll probably notice some jumpy scrolling animation. – Daniel Dickison Jun 16 '11 at 16:42

1 Answers1

2

It should be possible, however, start the performance tuning only if you need it. So many sins have been commited in the name of perfomance optimization!

Have a look at Comparison of JSON Parser for Objective-C (JSON Framework, YAJL, TouchJSON, etc) for some discussion about performance of the various frameworks.

Here's a review about the performance of the different frameworks, also linked in the Q&A I posted above:

enter image description here

Community
  • 1
  • 1
Nick Weaver
  • 47,228
  • 12
  • 98
  • 108