Re: Cocoa-dev Digest, Vol 14, Issue 154
Re: Cocoa-dev Digest, Vol 14, Issue 154
- Subject: Re: Cocoa-dev Digest, Vol 14, Issue 154
- From: "J. Scott Tury" <email@hidden>
- Date: Tue, 02 May 2017 15:40:59 -0400
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, email@hidden 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 (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