I've used CoreData extensively in various apps developed over several years, 
including multi-threaded use on two or more threads, and across multiple data 
stores. Like you have used the confinement method. I've found it very reliable 
except when bugs have broken the confinement model. Then things become 
unreliable with crashes or deadlocks happening unpredictably. I've build a 
framework on top of CoreData to manage contexts across threads and multiple 
data stores and a lot of convenience extensions to CoreData classes to simply 
my code and reduce errors.
Anyway hope this helps.

Regards
Mark

On 14 Feb 2013, at 07:34, Laurent Daudelin <laur...@nemesys-soft.com> wrote:

> I just added CoreData to an app I'm working on. I've been working with 
> CoreData for about a year, not exclusively but pretty regularly so I think 
> I'm experienced enough to set it up properly.
> 
> However, our testers are experiencing what I feel is more than normal crashes 
> in the main part of the app that depends on CoreData. I'm using an 
> NSFetchedResultsController to drive my main table view and that part seems 
> very weak and will break or raise an exception at any time for any reason. 
> I'm collecting those crashes that can be detected by TestFlight and there is 
> no relation between them but they all resolve around CoreData or the main 
> tableview.
> 
> The heaviest load is when I get a bunch of data from a server that is turned 
> into JSON objects and then saved to the database. There can be 200 pretty 
> large dictionaries coming at once and they are all saved to the database in a 
> serial queue, while at the same time, the fetched results controller sends 
> the usual delegate messages to adds those rows to the table view. I would say 
> that 80% of the time, it works just fine, but for about 20% of the loads, 
> some involved object will raise an exception. Since I'm using multiple 
> threads, and as recommended in the doc, I'm using the thread confinement 
> method to perform the needed operations that involve the database and managed 
> objects. I have one managed object context per thread, but there is really 
> only one, in that serial queue, plus the one in the main thread. I implement 
> the didReceiveManagedObjectContextSaveNotification: methods to merge the 
> changes on the main thread, as recommended. I pass object IDs when I need to 
> access a managed object context from one thread to another.
> 
> Still, I feel there are way too many crashes.
> 
> I have read from older messages that the fetched results controller could get 
> confused when issuing updates, moves and inserts back in iOS 3 and 4. But I 
> haven't found anything that would lead me to believe that these bugs are 
> still present. But, are they? Is it safe to use this technology for some 
> serious database work?
> 
> Any advice, pointer or info would be greatly appreciated.
> 
> Thank you.
> 
> -Laurent.
> -- 
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin                               
> http://www.nemesys-soft.com/
> Logiciels Nemesys Software                                    
> laur...@nemesys-soft.com
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mark.woollard%40mac.com
> 
> This email sent to mark.wooll...@mac.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to