> On May 3, 2012, at 6:11 PM, Ben Kennedy wrote:
> 
>> Separate from the above, I also have a new performance problem.  The loop in 
>> which I do my cascading updates executes inordinately slowly; simply 
>> assigning new values for two properties takes about 0.45 seconds when 
>> iterating a data set of a mere 135 objects.  It used to be instantaneous 
>> before bindings came into the picture.  I suspect that all of the KVO 
>> overhead is to blame (a quick peek in Instruments supports this).

In defence of KVO, I must rescind this hasty conclusion.  The real problem 
occurred to me in the shower this morning: the array controller was constantly 
re-sorting the data after every property change, by virtue of its 
sortDescriptors.  By temporarily clearing the sortDescriptors before the loop 
(and restoring afterwards), performance is golden again.  I should have 
realized this earlier.

On 03 May 2012, at 8:04 pm, Keary Suska wrote:

> Don't get me wrong, I think bindings are great, and I use them extensively in 
> almost everything I do. But it seems to me they are really built for 
> straightforward usage and if you need to stretch them they tend to break. Not 
> to mention that they are completely opaque and are a bear to debug.

Having not used bindings much (despite their availability for many years), I 
appreciate your experience and perspective, because it's in line with the 
impressions I've nonetheless been forming.  (Cocoa bindings sort of remind me 
of BOOPSI from the Amiga days, akin to a well-intentioned but awkward and 
gangly teenager.)

The motivation for moving my delegate-based table to a bound data source was in 
part to simplify the code needed for sorting and filtering in the UI -- but I 
was a bit naïve about the additional work implied by some of the trade-offs.

thanks,

b

--
Ben Kennedy, chief magician
Zygoat Creative Technical Services
http://www.zygoat.ca


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to