Re: CoreData pagination
Re: CoreData pagination
- Subject: Re: CoreData pagination
- From: Ian <email@hidden>
- Date: Tue, 24 Jun 2008 12:02:36 +0100
Here are my findings thanks to the great advice to all those that
answered.
First and foremost - I was testing on an elderly G5 iMac, so fetching
~million objects was taking 4 minutes.
I think this is definitely down to paging the VM as someone suggested.
Here on my main machine (8 cores, gigs of ram) the same fetch takes
around 9 seconds.
Unbelievably I hadn't [request setIncludesPropertyValues:NO], so was
getting properties on everything.
As I'm fetching primarily to feed an IKImageBrowserView, it makes
sense to fault the data in when needed.
This brings my fetch down from 9 seconds to 0.5 - much nicer.
I was pulling in all objects with a predicateWithValue:YES.
Changing this to a predicate on an indexed UID (eg to get all, fetch
where > 0) brings the query time down to 0.3 seconds.
Bringing in just IDs speeds things up even more.
All of the above is obvious I'm sure but great thanks are due for your
suggestions and advice - I may not be a CoreData newbie but I
certainly am rank amateur!
Thanks again to all,
Ian
_______________________________________________
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