Re: Display csv in a tableView with bindings
Re: Display csv in a tableView with bindings
- Subject: Re: Display csv in a tableView with bindings
- From: "I. Savant" <email@hidden>
- Date: Sun, 26 Jul 2009 17:09:46 -0400
On Sunday, July 26, 2009, Aaron Burghardt <email@hidden> wrote:
> Not necessarily. If the keys are NSStrings, then they are copied when added to the dictionary, but a copy of an immutable string is optimized to just retain it, so the data isn't duplicated (assuming all rows have the same columns in the same order, an assumption you don't seem to be making).
>
You're probably right about the strings ... but (continued below) ...
> A reasonable idea if the circumstances require it. It would certainly avoid storing a reference to each key in each row, so it would save a little memory, but with the mapping of indexes to column names, it may not be any faster than a dictionary.
>
This I've tested. It (creation and manipulation) takes less than ten
percent of the time with this method than does the dictionary
approach. A dramatic difference as I said.
> Unfortunately, I know from experience that when the row count gets above 8xx,000, NSTableView can no longer accurately draw rows in the view (if they are the standard-sized text fields). But that is well beyond that magic tipping point :-)
>
It certainly does.
--
I.S.
_______________________________________________
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