Re: Cocoa bindings performance
Re: Cocoa bindings performance
- Subject: Re: Cocoa bindings performance
- From: Niels Meersschaert <email@hidden>
- Date: Fri, 7 Apr 2006 15:07:21 -0400
That's a good resource that I've looked at, but my question is why is
there a difference in performance accomplishing the same lookup. In
my document class' readFromUrl method I added some code that requests
every instance of the entity in order to get the attribute value for
summing. I expect the same is occurring with the NSArrayController
when I have my code disabled. However, in my testing, the batch I do
in the readFromURL method takes less than a second vs several minutes
thru the NSArrayController's binding. Is NSArrayController's
implementation for retrieving Entity objects different to explain the
performance differential?
On Apr 7, 2006, at 2:34 PM, mmalcolm crawford wrote:
On Apr 7, 2006, at 11:26 AM, Niels Meersschaert wrote:
After saving a document that had about 3000 entities, I close it.
When I reopen the document, the GUI shows the spinning beachball
for several minutes. I've put in logging to determine the array
controller is getting valueForKey for each entity to generate the
sum. That's fine & expected, but it takes forever. Here's the
rub: In the readFromURL method in my document class, I did the
same effective lookup that the array controller is. I got the
entity from the context, fetching all objects & then got the sum
of the field looping thru all of the entities in the returned
array. When I do this, the file loads immediately & the bindings
show the correct data for each @sum field. Why the dramatic
difference in performance? Is this a bug in NSArrayController or
do I need to do the manual lookup in my document class?
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdPerformance.html#//apple_ref/doc/uid/TP40003468-SW3>
mmalc
_______________________________________________
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