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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to