1 Answer
1

Hard to say the specific differences in memory usage w/ your model in different iOS versions. In my experience, storing images in a core data store doesn't work particularly well. Generally, you want image data in memory only when needed. Each of your categories has ~4-7MB of image data so it won't take too many categories before you run into problems. What I did in my app was store image data on disk and store the filename in the store. The image is only loaded when needed for display and it is released when no longer needed. This keeps the store small and fetches are fast.

If you want to keep the image data in the store you should optimize as best you can. Configure all of your fetch requests to get all properties except the image data so that the image is faulted in when needed. You'll also need to ensure the image data is turned back into a fault when not needed.

EDIT: more info on why storing image data in core data is bad

Another problem with using core data to store image data is that loading and saving the data, even if done only when needed, takes a non-trivial amount of time and will block your main thread while loading. Wherever you store the image data, you want to load it from the background. That's simple if using a file store. If using core data, implement background image loading/saving logic that creates a new context, loads/saves the image data. When loading this would need to pass the data to the main thread so the UIImage can be created/displayed.

Thanks @XJones. "Configure all of your fetch requests to get all properties except the image data so that the image is faulted in when needed. You'll also need to ensure the image data is turned back into a fault when not needed.": is there a way to do that?
–
Dirty HenryDec 16 '11 at 19:11

No problem. Check out the propertiesToFetch property of NSFetchRequest.
–
XJonesDec 16 '11 at 19:13