On 04/09/2009, at 12:43 PM, Rob Keniger wrote:

I'm interested to know if anyone else has been bitten by what seems to be a fairly serious performance regression bug in 10.6 with NSArrayController/NSTreeController.

Basically, if you have an NSArrayController with more than a few bindings, changing selection in the controller takes at least an order of magnitude more time than in Leopard.


I added a benchmark to my sample project to loop through the array controller, selecting each object in turn:

NSTimeInterval t = [NSDate timeIntervalSinceReferenceDate];
NSUInteger j=0;
for(j=0;j<20;j++)
{
        [arrayController setSelectionIndex:j];
}
NSLog(@"duration %f", [NSDate timeIntervalSinceReferenceDate] - t); /* DEBUG LOG */

As you increase the number of bound properties this benchmark increases non-linearly:

10 properties: 12.989ms
25 properties: 50.816ms
50 properties: 166.453ms
100 properties: 681.625ms
150 properties: 2294.942ms
200 properties: 3295.174ms
250 properties: 7175.009ms
300 properties: 11204.541ms
600 properties: 65377.478ms

Has no-one else experienced these slowdowns?

--
Rob Keniger



_______________________________________________

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

Reply via email to