Re: NSTableView with large arrays
Re: NSTableView with large arrays
- Subject: Re: NSTableView with large arrays
- From: Trygve Inda <email@hidden>
- Date: Tue, 08 Nov 2005 11:39:01 +0000
>
> On 8 nov 2005, at 11.27, Trygve Inda wrote:
>
>> How should I handle it in Cocoa? In Carbon, all 10,000 records are
>> never in
>> memory at once, but all the Cocoa examples I have seen load up an
>> NSMutableArray with all the table data and use
>> objectAtIndex:rowIndex to
>> show it.
>>
>> Does NSTableView cache data at all?
>
> No, it only requests, and "caches", the visible rows.
>
>> How well will it perform with 10,000 rows?
>
> It depends completely on your data source implementation. You can
> still make it lazy if you want to. 10.000 rows should be no problem
> at all.
>
So if I ask it to sort, how does this work?
In Carbon, I just detect the current sort column (A or B) and use the proper
index (since it is all presorted). I never let the DataBrowser do the actual
sorting.
In Cocoa can I do the same? ie when it asks for row 1, I can determine it
based on one of my two indexes, but don't let the NSTableView do any real
sorting.
What method does it use to sort if I just toss all 10,000 records into an
NSMutableArray?
Thanks,
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden