Yosemite NSCollectionView appropriate for spreadsheet-like view?
Yosemite NSCollectionView appropriate for spreadsheet-like view?
- Subject: Yosemite NSCollectionView appropriate for spreadsheet-like view?
- From: email@hidden
- Date: Sun, 01 May 2016 12:06:55 -0400
Hi,
I have an NSTableView that may sometimes be called upon to display very large amounts of data. I can handle this in the vertical aspect - while my data source may have many thousands of rows, I only load batches of 500 at a time, and NSTableView doesn't slow down for rows not displayed. This is not true for columns, however. My performance/responsiveness is great below some number of columns (~15), but increase this much more (e.g. 200) and the performance lags. My guess is that since the basic unit here is NSTableRowView, all of the columns are loaded into each row view whether they are on the screen or not.
As I've been thinking about this problem it occurred to me that the new(ish) NSCollectionView might be a viable replacement in this case. Before I go down the rabbit hole, is it reasonable to use to create a spreadsheet-like view? What I'd like from this view is basically what you'd find in a spreadsheet - horizontal and vertical headers that scroll, editable cells, discontiguous selection, and high performance regardless of the number of data points.
(As a note; I am aware that displaying tens of thousands of cells in a view isn't immediately useful from a UI point of view and I have two preferred views as an alternate, but sometimes you just want to access the raw values.)
Cheers,
Demitri
_______________________________________________
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