CoreData - Fast Deletion Of Thousands Of ManagedObjects?
CoreData - Fast Deletion Of Thousands Of ManagedObjects?
- Subject: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
- From: Simon Liu <email@hidden>
- Date: Tue, 20 Dec 2005 16:32:15 +0000
I have a tableview representing managed objects. If I select all the
managed objects e.g.10,000, and delete them from the
managedObjectContext, there is a long delay e.g. 30 seconds.
Is there a way to delete large numbers of objects from a context
quickly and avoid the spinning beach ball? I don't really want to
have to delete the objects in a background thread, or put up a panel
saying 'Deletion in progress'.
My managed objects have relationships with nullify and cascade
deletion rules. My deletion code looks something this:
id undoManager = [[context undoManager] retain];
[context setUndoManager:nil];
while (obj = [enumerator nextObject]) {
[context deleteObject:obj];
}
[context setUndoManager:[undoManager autorelease]];
Appreciate any tips. Thanks.
--Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden