Re: Core Data performance advice... creating relationships.
Re: Core Data performance advice... creating relationships.
- Subject: Re: Core Data performance advice... creating relationships.
- From: "I. Savant" <email@hidden>
- Date: Tue, 15 Jan 2008 07:07:41 -0500
Could you elaborate on why you changed your position? In reading
your initial reply, I was inclined to agree that Core Data probably
wasn't the best solution in this instance (i.e. it's a decent-sized
data set and what was being described appeared to be a simple table
join scenario with no clear OO requirements.)
Sure. Originally, I thought the OP was trying, in the data modeler,
to add a property called "ID" (or something like it) and not use Core
Data's relationships mechanism. I realized that wasn't the case after
I'd sent my response.
The schema he described: Foo <------>> Bar ... is perfectly
suited to Core Data. The number of instances he mentioned, as
discussed many, many times before on this list, is acceptable as well.
It may be that there's simply no way to make this initial import of
800,000 objects go any faster, but there are a few effective tuning
tricks he could try first.
One may be due to garbage collection (creating that many short-
lived objects in a tight loop is ill-advised, for example). As another
suggested, it could have to do with how often he calls "save" on the
context.
I firmly believe that, once imported, this particular store will
run very quickly (with regards to fetching, relationship traversal,
etc.); Core Data is pretty quick there. It's just that building the
object graph is pretty intensive.
--
I.S.
_______________________________________________
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