Re: [CD] programmatically inserting MO in MOC gets slower with number of items II
Re: [CD] programmatically inserting MO in MOC gets slower with number of items II
- Subject: Re: [CD] programmatically inserting MO in MOC gets slower with number of items II
- From: "Jordan Krushen" <email@hidden>
- Date: Thu, 21 Sep 2006 10:28:37 -0700
On 9/21/06, Volker Runkel <email@hidden> wrote:
I discovered the reason for the slow down: For each newly inserted
MO I set the value for a relationship (a "parent" MO that has one-to-
many relation to my inserted MOs). Without the call setValue:forKey
to connect my newly inserted MO with its "parent" the insertion is
rather fast.
Still this does not solve my problem though, since I need to
establish that relationship. Is there a faster possibility to create
a relationship or can I make it faster ? Or do I have to live with
the fact that the nth object is inserted in the object tree x times
slower then the first ?
Do you have a tight loop with an accumulation of autoreleased objects
causing memory exhaustion? Does the Performance section in the
CoreData Programming Guide help you at all?
What do the profiling tools like Shark and ObjectAlloc tell you?
Showing your code often helps, as well.
As djb says, "Profile. Don't speculate."
J.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden