You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i have performance issues with the IBPUICollectionViewCompositionalLayout.
During the scroll, the IBPUICollectionViewCompositionalLayout's layoutAttributesForElementsInRect method always ask data source for the cell, if we use estimated item size and item contentInsets.
the documentation / comments says: contentInsets are ignored for any axis with an .estimated dimension
which is not ignored, makes the performance really bad.
Even if the collectionView's dequeueReusableCell method are used, it creates a new instance of the cell (and run the layouting)
Issue is on iOS 12, there is no any unwanted cell creation or performance issue on iOS 13
how to reproduce:
use estimated item height in Examples/ListViewController2:
change: let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))
to: let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(10.0))
The text was updated successfully, but these errors were encountered:
Hi,
i have performance issues with the IBPUICollectionViewCompositionalLayout.
During the scroll, the IBPUICollectionViewCompositionalLayout's layoutAttributesForElementsInRect method always ask data source for the cell, if we use estimated item size and item contentInsets.
the documentation / comments says:
contentInsets are ignored for any axis with an .estimated dimension
which is not ignored, makes the performance really bad.
Even if the collectionView's dequeueReusableCell method are used, it creates a new instance of the cell (and run the layouting)
Issue is on iOS 12, there is no any unwanted cell creation or performance issue on iOS 13
how to reproduce:
use estimated item height in Examples/ListViewController2:
change:
let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))
to:
let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(10.0))
The text was updated successfully, but these errors were encountered: