Hi Cocoa List,

>> warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered
>> 5000 views!!!
>>
>> It usually occurs when a NSCollectionView is being refreshed, but not
>> every time.

> I believe that NSCollectionView creates all of the item views up front,
> and doesn't lazily create them or destroy them. So, there really are
> 5000+ subviews. You should take a look at the collection view's subviews
> to see.
>
> -- Joe Ranieri
>

Thanks.  It does seem to be the problem.  In total, there are over 10,000
(6 per represented object) views being displayed by the Collection View. 
Is there a hard number written down somewhere that you're not supposed to
go over?  I haven't been able to find such a warning in the documentation.

In trying to save myself Interface Builder work, I have a single
NSCollectionView that is used to display two different kinds of objects. 
I have a NSCollectionView subclass that unbinds itself from one
NSArrayController, and then binds itself to the other NSArrayController at
runtime to make this work, changing its item prototype at the same time. 
It worked impressively well with the handful of objects I first tested
with, but is quite slow with ~5000 objects.  I think I'll have to try
separating them out as two different NSCollectionViews as a first step.

Is there any reason to think NSMatrix or IKImageBrowserView (with the
associated overhead of image compositing) would be more able to cope with
~5000 objects?

Thanks,
Arved

_______________________________________________

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

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

Reply via email to