• 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
CoreData performance issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData performance issues


  • Subject: CoreData performance issues
  • From: Tomek Piatek <email@hidden>
  • Date: Wed, 22 Jun 2005 12:10:59 +1200

We are trying to use CoreData for an in-house application. This application has to be able to deal with the following data model:

Project<--->>Scene<--->>Shot<--->>Take

Project attributes:
name

Scene attributes:
name

Shot attributes:
name

Take attributes:
name
creation_date

where <--->> means one-to-many relationship.

The managed object context is initially constructed by processing a text file which contains one record per line. Each record contains a number of fields. The fields are of various types: strings, integers and dates. The input text file can contain hundreds of thousands of records and it only has to be ingested once to bootstrap our application.

We have written a simple test application which reads in a line at a time from the text file and for each record creates a managed object instance. The managed object context is saved only once after all records have been processed. We want to avoid duplicates and in fact we want to reuse existing managed objects. For example, when ingesting a new scene we want to create a new project object only if one with the given name doesn't already exist.

We found that processing 20,000 records using this "find-or-create" approach is so slow that it makes CoreData basically useless. It took hours on a dual 1.25GHz G4 with 1.25GB or memory. We then simplified out application to not check for duplicates. This approach took about 10 minutes on the same machine.

I admit that we are new to CoreData and only have short experience in Objective-C. We do have extensive experience in other languages and SQL-based database development. We have done all data modelling and designed fetch request templates using XCode2.1.

What kind of performance can we expect from CoreData with SQLite back- end? Are there any performance benchmarks available? Are there any optimisation guidelines?

-tomek


_______________________________________________ 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 performance issues
      • From: Chris Hanson <email@hidden>
    • Re: CoreData performance issues
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: WWDC 2004 Source Code
  • Next by Date: Re: Cocoa-dev Digest, Vol 2, Issue 951
  • Previous by thread: Re: Where is the Build Log
  • Next by thread: Re: CoreData performance issues
  • Index(es):
    • Date
    • Thread