10.11 CollectionView reuses views and doesn’t create 100,000 cells. So that 
could be appropriate.

> On May 3, 2016, at 12:53 PM, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On May 1, 2016, at 9:06 AM, thatsanicehatyouh...@me.com wrote:
>> 
>> 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?
> 
> No, because it eagerly creates a view for every item in the collection. So if 
> you have a spreadsheet with 100,000 cells, it’s going to create 100,000 
> NSViews when the window opens.
> 
> NSMatrix may work better because it uses only a single view, but IIRC it 
> still preallocates an NSCell for every item. Also I think it’s been 
> deprecated.
> 
> I suspect you’ll need a custom view that uses cells or some other 
> lightweight-view design pattern to avoid consuming resources for items that 
> aren’t currently visible. (Of course, someone else may have already 
> implemented that custom view, either as open source or commercially.)
> 
> —Jens
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to