• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?


  • Subject: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • From: Simon Liu <email@hidden>
  • Date: Tue, 20 Dec 2005 22:25:24 +0000

I'm using a SQLite store which the CoreData docs claim to be the fastest store.

Regardless of the store type, there doesn't seem to be a way to delete
a large number of objects quickly, even when only invoking
-deleteObject: on a context, and leaving the changes uncommitted.

On 12/20/05, Justin Burns <email@hidden> wrote:
> 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]];
> >
_______________________________________________
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

References: 
 >CoreData - Fast Deletion Of Thousands Of ManagedObjects? (From: Simon Liu <email@hidden>)
 >Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects? (From: Justin Burns <email@hidden>)

  • Prev by Date: Re: Ideal size of an NSScrollView?
  • Next by Date: Re: NSSpeechSynthesizer leaking
  • Previous by thread: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Next by thread: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Index(es):
    • Date
    • Thread