• 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: Chris Hanson <email@hidden>
  • Date: Tue, 20 Dec 2005 12:03:32 -0800

On Dec 20, 2005, at 11:30 AM, Justin Burns wrote:

SQLite has been entirely too slow for my tastes when trying to import a few tens of thousands of records

How did you structure this import? Does it look anything like this pseudocode?

get an old-style record
see if a matching record already exists by issuing a fetch
if a matching record doesn't exist:
create a new record
set its attributes
issue a fetch to find related records
set its relationships

I refer to this as a "find-or-create" pattern and it offers many opportunities for optimization. The most important optimizations here are to cut down on or eliminate unnecessary fetches, and to introduce intermediate autorelease pools to prevent unbounded growth of your working set.

-- Chris

_______________________________________________
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: NSSpeechSynthesizer leaking
  • Next by Date: Re: Implementing a scrollable icon-table
  • 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