Re: Massive slowdown in NSArrayController selections in 10.6
Re: Massive slowdown in NSArrayController selections in 10.6
- Subject: Re: Massive slowdown in NSArrayController selections in 10.6
- From: Rob Keniger <email@hidden>
- Date: Sat, 5 Sep 2009 15:34:24 +1000
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 (email@hidden)
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:
This email sent to email@hidden