• 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: 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
  • Follow-Ups:
    • Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
      • From: Simon Liu <email@hidden>
    • Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
      • From: Chris Hanson <email@hidden>
    • Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
      • From: mmalcolm crawford <email@hidden>
References: 
 >CoreData - Fast Deletion Of Thousands Of ManagedObjects? (From: Simon Liu <email@hidden>)

  • Prev by Date: Re: Adding password for a file to keychain
  • Next by Date: Authenticating multiple Installers with one prompt
  • Previous by thread: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Next by thread: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Index(es):
    • Date
    • Thread