Storm in a water glass? (Was: Table View Blues (summary))
Storm in a water glass? (Was: Table View Blues (summary))
- Subject: Storm in a water glass? (Was: Table View Blues (summary))
- From: email@hidden
- Date: Thu, 21 Nov 2002 15:28:45 -0500
I did some benchmarks today on the NSTableView data source deallocation
thing, starting with the "standard" way of dealing with matters -
NSMutableArray, NSString, and so forth. Another test with tweaks/cheats
etc. will be forthcoming - or so was my intention before today's test
results.
I put the timer in the actual record deletion routine with the number
of records set to 40,000, which with 7 columns of data is equivalent to
10,000 records with 26 columns of data, and which given business
applications is not an unreasonable number at all.
Selecting all and even creating all these strings was no problem. That
went fast enough. I saved a screen dump which shows there were 40,000
records to delete.
I answered "Yes" to the "are you sure" dialog and thought for sure the
application timed out. It did not - it finally responded exactly while
I was writing this. The entire process left a beach ball spinning on my
desktop for just over 445.972351 or 7:25 (seven minutes twenty five
seconds).
Clearly this is not only unacceptable, it's not even in the right ball
park.
And to make sure there were no questions about how the thing was coded,
I made an entirely new application, taken straight from Aaron
Hillegass. All I did was add a few columns, until I decided to just add
more rows instead.
if (NSRunAlertPanel(
@"Delete",@"Do you really want to delete %u records?",
@"Yes",@"No",nil,
[peopleToRemove count]) == NSAlertDefaultReturn) {
start = [NSDate date];
[employees removeObjectsInArray:peopleToRemove];
[self updateChangeCount:NSChangeDone];
[self updateUI];
NSRunAlertPanel(
@"Time",
@"Time taken was %f.",
nil, nil, nil,
[[NSDate date] timeIntervalSinceDate:start]);
}
ftp://rixstep.com/pub/before.png (16KB)
ftp://rixstep.com/pub/after.png (16KB)
R.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.