Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
- Subject: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
- From: Justin Burns <email@hidden>
- Date: Tue, 20 Dec 2005 11:30:12 -0800
Which backing store are you using for CoreData, and have you tried
switching it out for a different one?
SQLite has been entirely too slow for my tastes when trying to import
a few tens of thousands of records, so I've switched back to using
XML for most of my apps; I can generate a flat file of the 34k or so
records in a few seconds, whereas SQLite was going to take an hour or
more to import them.
-justinb
On Dec 20, 2005, at 8:32 AM, Simon Liu wrote:
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:
40shipwreckbeads.com
This email sent to email@hidden
_______________________________________________
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