开发者

iOS: Deserializing JSON in separate thread?

开发者 https://www.devze.com 2023-03-13 21:38 出处:网络
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 demonstr

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:

iOS: Deserializing JSON in separate thread?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号