I am developing an application for the iPhone that makes extensive use of Core Data, mainly for its database-like functions (for example, the ability to set the sort order or predicate for select queries). I present all the data that I get in different UITableViewControllers.
What I would like to know is a rough idea of how many objects I can retrieve before it becomes a good idea to use NSFetchedResultsController to process the request. Core Data docs say SQLite storages say that "10,000 objects are a fairly small data set," but the documentation for NSFetchedResultsController mentions storing "dozens of objects" in memory at a time.
I deal primarily with data sets of up to fifty objects, each of which can have a dozen instances of NSNumber and NSString, as well as a one-to-many relationship for the next set of objects (that is, there are twenty instances of object A, each of which has to-many relation to a set of thirty (separate) instances of object B, each of which ...).
Is this script suitable for using NSFetchedResultsController, or can I get away with a simple NSArray of results? I have no problem managing subtleties of the controller (convenient methods for getting an object for the UITableView index path, adding new objects to the context, etc.), I'm just interested in using memory for each approach.
I should mention that the application will be primarily intended for iPhone 3G (not S) and first-generation iPod users, so please keep the limited memory of these platforms in mind.
memory-management iphone cocoa-touch core-data
Tim Aug 12 '09 at 0:47 2009-08-12 00:47
source share