Re: Core Data, SQLLITE, and slow Array Operators
Re: Core Data, SQLLITE, and slow Array Operators
- Subject: Re: Core Data, SQLLITE, and slow Array Operators
- From: BK <email@hidden>
- Date: Fri, 27 Oct 2006 09:59:35 -0700
Diederik,
I did something similar. For an entity property, there are two methods:
- (long long)elapsedTime
- (void)setElapsedTime:(long long)value
Within elapsedTime, I added these two lines of code:
static unsigned i = 0;
NSLog( @"i = %d", i++ );
And then I ran my app. With no data in the store, and when I import
data and use insertNewObjectForEntityForName, i goes up to 56. If I
quit the app and restart it, i continues past 10,000 and does not
stop; I have to eventually abort it. Same data, same array operator
for a binding value: email@hiddenedTime. It is very
strange.
Thanks for your help. I'll try your suggestion also, but it'll
probably show the same results.
I posted a copy of the app (it's free), along with sample data and a
read me file. Feel free to give it a try <www.modesittsoftware.com/
temp/TimeSliceDB.zip>. I'd really like to know what's going on.
Thanks.
-Bill
On Oct 27, 2006, at 12:08 AM, Diederik Hoogenboom wrote:
Bill,
If you switch SQLLite debugging on ("-com.apple.CoreData.SQLDebug
1" argument on the executable) what queries give you the
performance hit? Is it just one query or does the system tries to
do 10,000 fetches?
Diederik
On 26-okt-2006, at 19:41, email@hidden wrote:
I have a relatively simple Core Data application that stores data
in SQLLite format. Bindings are also used. Everything works
fine except when I use any array operators on the data after the
data have been read from disk. If I start with an empty data
store, and populate it with about 1,000 records using
NSEntityDescription insertNewObjectForEntityForName, the array
operator calculations are performed almost instantly. If I then
quit the app and reopen it so that the data are read back in, the
same array operators on the same data takes about 45 minutes (yes,
minutes) to calculate the same values. Why could possibly be
slowing down the calculations of the array operators working on
the exact same data? Any help would be appreciated.
Thanks,
Bill
_______________________________________________
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