• 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: Core Data dog-slow when using first time after boot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data dog-slow when using first time after boot


  • Subject: Re: Core Data dog-slow when using first time after boot
  • From: Ruotger Skupin <email@hidden>
  • Date: Wed, 19 Aug 2009 19:14:11 +0200


Am 19.08.2009 um 18:38 schrieb Nick Zitzmann:


On Aug 19, 2009, at 4:13 AM, Ruotger Skupin wrote:

when fetching about 5000 objects from an sql store, Core Data is very slow the very first time after a boot. When running the app the first time it takes 50 to 90 seconds and when starting it the second time it is well below one second.

What is going on here? Has anyone noticed this too?


Did you try using Shark to find out why this is happening?

According to shark basically nothing plus some time spend in faults. Shark is useless when perf-debugging Core Data.

I debugged it with some Snow Leopard magic and found out, that firing faults is very slow the first time after boot. When I use -[NSArray filteredArrayUsingPredicate:] the fault firing is killing me.

So I recoded it to fetch everything upfront with [fetchRequest setReturnsObjectsAsFaults:NO]; and the fetching of 5000 objects still takes more than 15 seconds. On second launch that's about 3 seconds. This seems to be slow.

Ruotger

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Core Data dog-slow when using first time after boot
      • From: "I. Savant" <email@hidden>
References: 
 >Core Data dog-slow when using first time after boot (From: Ruotger Skupin <email@hidden>)
 >Re: Core Data dog-slow when using first time after boot (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: NSFetchedResultsController with custom NSSortDescriptor
  • Next by Date: Re: Get size of folder
  • Previous by thread: Re: Core Data dog-slow when using first time after boot
  • Next by thread: Re: Core Data dog-slow when using first time after boot
  • Index(es):
    • Date
    • Thread