Re: CoreData performance issues
Re: CoreData performance issues
- Subject: Re: CoreData performance issues
- From: John Timmer <email@hidden>
- Date: Wed, 22 Jun 2005 16:04:45 -0400
Title: Re: CoreData performance issues
On 22/06/2005, at 5:29 PM, Chris Hanson wrote:
On Jun 21, 2005, at 5:10 PM, Tomek Piatek wrote:
We have written a simple test application which reads in a line at a time from the text file and for each record creates a managed object instance. The managed object context is saved only once after all records have been processed. We want to avoid duplicates and in fact we want to reuse existing managed objects. For example, when ingesting a new scene we want to create a new project object only if one with the given name doesn't already exist.
Just out of curiosity, are you matching against a single identifier every time when you check whether an object exists already? If so, you should just dump new keys into an NSMutableSet, since checking whether an object is in a set is very efficient. If you use the CFSet function to check for the presence of your key in a set instead of the ObjC method, you can also cut down on object messaging and speed things up even more.
JT
_______________________________________________
This mind intentionally left blank
_______________________________________________
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