Re: CoreData - large data set is slow to load on app launch - optimisation tips?
Re: CoreData - large data set is slow to load on app launch - optimisation tips?
- Subject: Re: CoreData - large data set is slow to load on app launch - optimisation tips?
- From: Simon Liu <email@hidden>
- Date: Sun, 4 Dec 2005 17:26:19 +0000
Thanks Chris. Using a relationship has improved things immensely. I
have a datastore of 160MB, 10,000 main instances and the launch time
is down to 2-3 seconds. That's with an array controller with a filter
predicate and sort descriptor, populating a table.
I did notice something strange with searching the data though. My
search field has a couple of predicate bindings where the first
'predicate' binding is bound to 'All' which ANDs several predicate
clauses e.g.(title contains[c] $value) AND (....) AND (...) etc.
Fairly standard.
The first search after launch with 'All' takes about 30-40 seconds.
This is bad.
However, I noticed that if for the first search I select a predicate
with just one clause, e.g. "Title" (title contains[c] $value) the
search is very fast, 1-3 seconds. If I then do another search, using
'All' the search is quite fast, around 2-3 seconds. So it's not the
'All' predicate which is causing the 30-40 seconds of slowness.
I've repeated this many times, and the results are the same. What's
happening behind the scenes that might cause this? From profiling,
during the 30-40 seconds, most of the time seems to be spent in
sqlite3() calls.
On 12/3/05, Chris Hanson <email@hidden> wrote:
>
On Dec 3, 2005, at 9:01 AM, Simon Liu wrote:
>
>
> My app's single SQL store contains over 5,000 instances of an entity,
>
> each with an associated image (jpeg data). There are also other
>
> entities, relationships, etc. The SQL store comes in at around 80MB.
_______________________________________________
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