On Sat, Sep 3, 2011 at 12:12 AM, Trygve Inda <cocoa...@xericdesign.com> wrote: > I understand that... I think the alternative would be to register an > observer on all 8000+ objects in the array.
Yes, this is the expected pattern with KVO. Contrary to what you might think at first, it is *fast*. To use OmniPlan 2 as an example, each cell in each row in the outline view registers itself as an observer of one property of the model object (actually a controller-layer proxy). The row itself registers as a KVO observer of a few other properties of that proxy. OmniPlan 2 documents usually have a few hundred if not thousands of rows. We have never seen any of the KVO implementation functions appear in our sample reports during performance testing. In fact, KVO is *much* faster than using NSNotificationCenter for the same purpose. But sending one NSNotification is much faster than sending 8,000 KVO notifications. So do what's right for the situation at hand. If you need to know about the "marked" property of 8,000 objects, register yourself as a KVO observer for each of those 8,000 objects. --Kyle Sluder > > For now however, the checkbox is the only way to alter the marked state so > this should work. > > Thanks! > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/kyle.sluder%40gmail.com > > This email sent to kyle.slu...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com