• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa bindings performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa bindings performance


  • Subject: Cocoa bindings performance
  • From: Niels Meersschaert <email@hidden>
  • Date: Fri, 7 Apr 2006 14:26:05 -0400

I've come across a strange behavior & I'm trying to determine if it is a bug or something wrong with my implementation. I have a core data document based app. I'm using the standard NSArrayContoller bound to an entity in Interface Builder. I have several properties in my UI that depend on looking at the array controller's arrangedObjects & the model key path is @sum.fieldname.

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?

Thanks,

Niels

_______________________________________________
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


  • Follow-Ups:
    • Re: Cocoa bindings performance
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: nubie: help return an object from another class
  • Next by Date: Re: Cocoa bindings performance
  • Previous by thread: Re: NSBitmapImageRep subclass problem
  • Next by thread: Re: Cocoa bindings performance
  • Index(es):
    • Date
    • Thread