View-based NSTableView vs NSCollectionView?

I understood the NSTableView cell-based Fly-weight approach, and I think I understand the differences with NSCollectionView. Differences between (cell-based) NSTableView and NSCollectionView

However, less obvious is the difference between an NSTableView and an NSCollectionView based on the view .

Due to the flexibility of NSCollectionView when displaying its elements (i.e. in a grid layout) that can emulate a tableView list (a grid with a maximum of one column) and excluding personalized preferences, why does someone choose (based on View) an NSTableView over an NSCollectionView?

+6
source share
1 answer

NSCollectionView does not use the viewer utility. This means that a view will be created for each view item in a separate collection, regardless of whether the view is on screen or not. This can damage your performance with large datasets. A view- NSTableView uses view processing and is very efficient because it processes a limited number of cells instead of creating new ones for each element. Not to mention that the NSCollectionView as a whole is a poorly written and poorly documented class.

+9
source

Source: https://habr.com/ru/post/912074/


All Articles