Re: Core Data performance advice... creating relationships.
Re: Core Data performance advice... creating relationships.
- Subject: Re: Core Data performance advice... creating relationships.
- From: email@hidden
- Date: Mon, 14 Jan 2008 23:57:18 -0200
Using 'Instruments' my CPU usage breaks down pretty much like this:
60% NSManagedObject setValue: forKey:
20% NSManagedObjectContext executeFetchRequest:
16% NSManagedObjectContext save:
4% (misc)
So it is setting the relationships themselves which seems to take
most of the time.
Of course, setting a relationship load the entire graph for that
entity (eg.: foo.bar = newBar would load all foos in newBar, just to
update the set called "foos"). You could :
- Forget relationships and use fetched properties if the set is really
large;
- Increase the stalenessInterval ([NSManagedObjectContext
setStalenessInterval:]), avoiding some faults but increasing RAM usage;
- Ask for more help, because I'm out of ideas.
:: marcelo.alves
:: marcelo.alves
_______________________________________________
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