[TIMOB-11947] iOS: Option to enable cell rasterization on TableViews for increased performance when dealing with multiple rows.
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Ygor Lemos |
Assignee | Unknown |
Created | 2012-09-26T21:33:43.000+0000 |
Updated | 2018-02-28T20:03:38.000+0000 |
Description
We should be able to enable cell rasterization for increased tableview performance when dealing with lots of rows.
A brief description from Stackoverflow:
cell.layer.shouldRasterize = YES;
cell.layer.rasterizationScale = [UIScreen mainScreen].scale;
This will collapse your view hierarchy into one flat bitmap, which is the kind of thing Core Animation just loves to draw. Note that any animating views—activity indicators, for instance—will force that bitmap to be updated every time they change, i.e. a lot. In that case, you won't want the cell to rasterize everything; you might just use a subview with all of your relatively static views (e.g. labels) beneath another subview with any such dynamic content, and only have the first of those rasterized.
No comments