Hi Steve, 

I recently moved an iOs project over the macOS.  We had the exact same though 
at first.  

After analyzing what was happening in the app using Instruments, I was able to 
pin point performance issues within our own iOS engine, which caused the 
performance issues I was seeing on macOS.  Since macOS is reliant on Coca 
Bindings, you want to make sure you are not  abusing the system by setting 
properties to values which they are already set to.  Any modification of a 
property will cause KVO and binding callbacks to redraw your cells.

Also be careful how you use CoreData to fetch your data on macOS.  Certain 
settings on the controller will cause you to load the entire database into 
memory - making your product potentially unusable.  For instance on an 
ArrayController, setting the automaticallyRearrangesObjects to true, may cause 
a fault that winds up loading in all of your data from the database!  Let your 
predicate arrange the objects correctly for you.  Don’t force the 
arrayController, to then do more work that’s unnecessary.

In short, use Instruments to see what your app is really processing for your 
collectionView.  You may be surprised at what is happening.  Once those 
interactions are cleaned up, performance should be good.

Good luck!

Scott Tury

> On May 2, 2017, at 3:00 PM, cocoa-dev-requ...@lists.apple.com wrote:
> 
> Has anybody written something better than NSCollectionView to display a 
> scrolling matrix of cells that has good performance with thousands of items 
> and works with an array controller? NSCollectionView is a complete mess. 
> Everything I do is met with crummy behavior.
> 
> --
> Steve Mills
> Drummer, Mac geek

_______________________________________________

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