• 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: Does Core Data have a serious problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does Core Data have a serious problem?


  • Subject: Re: Does Core Data have a serious problem?
  • From: Ruotger Skupin <email@hidden>
  • Date: Thu, 3 May 2007 17:11:01 +0200


Am 03.05.2007 um 16:22 schrieb Robert Walker:

4. The context seems to lock the store coordinator during a save!!! (ouch!)


I can't seem to think of any applications that allow you to do anything else while saving files. I guess I just don't see your point here. Core Data is designed for speed. If you are having performance problems, my guess would be that you are either misusing Core Data, or your data is not well suited for use in Core Data. I would suspect Core Data wouldn't be appropriate for things like video formats, raw photo data, etc.



Ok. Let's take the Apple Employee-Department example.

My Employee has about 30 attributes. Those are numbers, dates, small strings (< 200 char). No large strings, no blobs. It also has three relationships.

When I have about 6 Departments with about 20 000 Employees and I delete a Department the consecutive save takes between 5-15 seconds (on a PB G4 1.5GHz)!

That can means a 5-15s hang! (beach ball, no menus, nothing...)

Since I try to do everything on a background thread, I'm down to cutting at most 10 relationships at a time in-between saves. Save time goes down to 300-400ms. Blocking that long already makes the app feel sluggish but it's still usable.

(Cutting relationships seems to be a lot more expensive, then deleting objects upon save. weird.)

Maybe Core Data should not be used with more than one context at all, due to the high costs of propagating new/changed/deleted objects between contexts via saving.

Roddi



P.S.: Locks are like tanks - powerful, slow, safe, expensive, and prone to getting you stuck. --- http://ridiculousfish.com/blog/ archives/2007/02/17/barrier/


And tanks are absolutely necessary in modern warfare. ;-)


as are locks in modern multicore processor environment... <sigh>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Does Core Data have a serious problem?
      • From: Robert Walker <email@hidden>
References: 
 >Does Core Data have a serious problem? (From: Ruotger Skupin <email@hidden>)
 >Re: Does Core Data have a serious problem? (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: Does Core Data have a serious problem?
  • Next by Date: Having trouble with NSTreeController, Core Data, and NSOutlineView
  • Previous by thread: Re: Does Core Data have a serious problem?
  • Next by thread: Re: Does Core Data have a serious problem?
  • Index(es):
    • Date
    • Thread