ios - UICollectionView performance - _updateVisibleCellsNow -


i'm working on custom uicollectionviewlayout displays cells organized day/week/month.

it not scrolling smooth, , looks lag caused [uicollectionview _updatevisiblecellsnow] being called on each rendering loop.

performance ok < 30 items, @ around 100 or more, terribly slow. limitation of uicollectionview , custom layouts, or not giving view enough information perform correctly?

source here: https://github.com/oskarhagberg/calendarcollection

layout: https://github.com/oskarhagberg/calendarcollection/blob/master/calendarheatmap/ohcalendarweeklayout.m

data source , delegate: https://github.com/oskarhagberg/calendarcollection/blob/master/calendarheatmap/ohcalendarview.m

time profile: time profile - custom layout

update

maybe futile? testing plain uicollectionviewcontroller uicollectionviewflowlayout given approximately same amount of cells/screen results in similar time profile.

time profile - standard flow layout

i feel should able handle ~100 simple opaque cells @ time without jitter. wrong?

also don't forget try rasterize layer of cell:

cell.layer.shouldrasterize = yes; cell.layer.rasterizationscale = [uiscreen mainscreen].scale; 

i had 10 fps without that, , boom 55fps with! i'm not familiar gpu , compositing model, not entirely clear me, flatten rendering of subviews in 1 bitmap (instead of 1 bitmap per subview?). anyway don't know if has cons, dramatically faster!


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -