• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Improving speed of NSCollectionView scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improving speed of NSCollectionView scrolling


  • Subject: Re: Improving speed of NSCollectionView scrolling
  • From: PCWiz <email@hidden>
  • Date: Tue, 8 Dec 2009 21:14:42 -0700

Ok, I think I've solved this problem. Corbin, you're right, the problem is too many subviews.

What I did to counter this problem is to actually draw most images/text in my prototype NSView subclass rather than using subviews like NSImageView and NSTextField. This yielded a pretty noticeable speed increase.

Hope this helps anyone else having similar issues. Key point: just do the drawing yourself.

On 2009-12-08, at 5:31 PM, Corbin Dunn wrote:

>
> On Dec 8, 2009, at 3:40 PM, PCWiz wrote:
>
>> Hi,
>>
>> I am using NSCollectionView for a project in which the collection view is populated with about 200 items, each containing about 4 subviews (image view, and a few text fields).
>
> You may want to consider using a different view. NSCollectionView does not do any special things for views that aren't visible, and you get one view for each item. So, in this case, you have at least 5 * 200 = 1000 views. That's a lot. Try IKImageBrowserView or NSTableView/NSOutlineView.
>
> corbin
>
>

_______________________________________________

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

References: 
 >Improving speed of NSCollectionView scrolling (From: PCWiz <email@hidden>)
 >Re: Improving speed of NSCollectionView scrolling (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Best way to hook into the run loop?
  • Next by Date: Issue with Input method using IMK
  • Previous by thread: Re: Improving speed of NSCollectionView scrolling
  • Next by thread: Finding process path from Cocoa?
  • Index(es):
    • Date
    • Thread