Re: Need of an Apple Engineer. Core-Data Issues
Re: Need of an Apple Engineer. Core-Data Issues
- Subject: Re: Need of an Apple Engineer. Core-Data Issues
- From: Scott Ellsworth <email@hidden>
- Date: Wed, 29 Mar 2006 14:11:22 -0800
On Mar 29, 2006, at 1:03 PM, malcom wrote:
However I've uploaded a small testing project as you said.
If anyone can see these CoreData performance issues the link is here:
I grabbed the source, and I am having trouble reproducing the problem
on my dual G5/2.0.
My problem is that during the first fetch Core Data takes from 3 to 8
seconds to load all articles entities.
When I tried it, I saw:
CDTestAPP[6321] end fetch 16025, elapsed time 0.821675 seconds
I realize that my system has a fast drive, but I am surprised that it
was that much faster.
I did try the simple experiment of making the message_id a non-
optional parameter, and then removing the predicate, which made no
substantial difference in the fetch speed.
Are you sure your system is not doing anything else? Open activity
monitor and see what the load looks like. Also look at your memory -
are you going into swap during the fetch?
(Also, I was not able to open the shark profile you sent, as I am
using a different version. As I read it, though, pretty much all the
time is taking place in executeFetchRequest, which is what we would
expect.)
I turned on sql debugging, and saw:
2006-03-29 14:07:27.194 CDTestAPP[6395] CoreData: annotation:
Connecting to sqlite database file at "/Users/work/Library/
Application Support/Nemo/index.sqlite"
2006-03-29 14:07:27.194 CDTestAPP[6395] CoreData: sql: pragma
synchronous=normal
2006-03-29 14:07:27.195 CDTestAPP[6395] CoreData: sql: SELECT
TBL_NAME FROM SQLITE_MASTER WHERE TBL_NAME = 'Z_PRIMARYKEY'
2006-03-29 14:07:27.196 CDTestAPP[6395] CoreData: sql: SELECT 0,
A.Z_PK, A.Z_OPT, A.ZDATE, A.ZMESSAGE_ID, A.ZSUBJECT, A.ZFROM,
A.ZFATHER, A.ZBODY FROM ZARTICLE A WHERE A.ZMESSAGE_ID IS NOT NULL
2006-03-29 14:07:27.602 CDTestAPP[6395] CoreData: annotation: fetch
execution time: 0.408009s
2006-03-29 14:07:27.730 CDTestAPP[6395] end fetch 16025, elapsed time
0.836105 seconds
That fetch request looks reasonable to me. It is asking for
everything it needs in one big fetch.
One test you might want to perform - as it mentions in the docs at
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdTroubleshooting.html>, send -com.apple.CoreData.SQLDebug 1
as an argument to the application. You can do this from the get info
window on the application in xcode.
Does it show eight seconds reading that directory?
Again, how much free ram do you have during the fetch? As I
mentioned above, if you started to swap, that could explain these
poor results.
Scott
_______________________________________________
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