iOS: Deserializing JSON in separate thread?
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开发者_StackOverflow 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?
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:
精彩评论