Archive for February 27th, 2010

27
Feb

Switching from Core Data

Here’s a thoughtful piece on when not to use Core Data that’s worth reading:

… I optimized as much as I could, spent tons of time in Shark, went all multi-threaded with Core Data, switched away from my own queuing system to NSOperationQueue, optimized the XML parsing, etc. But performance and memory use on my first-generation iPod Touch (my development test device) was still not nearly good enough with a big unread count (of around 10,000 items).

At that point, having done everything else, the remaining issue was clearly Core Data. So I tried more things, re-read everything I could about Core Data performance (for the nth time), ran experiments, spent tons more time in Shark. Trying to get it good. No go.

Finally I realized I had to switch away from Core Data and use SQLite more directly. Not completely directly — I use FMDB, a lightweight Objective-C interface that works on Macs and iPhones. Gus wrote it. It’s good…

Definitely worth reading over before putting together anything with heavy data manipulation requirements, yep!

[UPDATE: And check out the other reactions that MobileOrchard collected!]