Source Address: http://fann.im/blog/2012/09/11/uitableview-optimization-notes/
Hacking Week Technical Summary of the last article, remember UITableView performance optimization needs attention and improvement.
- Network images are loaded asynchronously, sdwebimage.
- Text directly Drawinrect/drawatpoint drawing, refer to Abtableviewcell,advancedtableviewcells.
- Local images can also be drawn directly, or added to the display using Calayer.
- Cell reuse mechanism.
- The cell content avoids the transparency effect as much as possible.
- If not necessary, reduce reloaddata all cells, only reloadrowsatindexpaths.
- If the cell is dynamic row height, the height is computed after the cache. TableView will calculate the height of all cells at the time of loading
heightForRowAtIndexPath: , even if the cell is not displayed.
- If the cell content placement is not fixed, it will be cached after the first calculation.
- If the cell height is fixed directly with the
cell.rowHeight height, do not implement tableView:heightForRowAtIndexPath: delegate.
- Cell content parsing operations (especially complex parsing) are performed asynchronously with pre-execution, and the parse results are cached.
- Can pre-load the required network resources (pictures, etc.), Sdwebimageprefetcher.
There is performance implications to using instead of the property tableView:heightForRowAtIndexPath: rowHeight . Every time a table view is displayed, it calls on the tableView:heightForRowAtIndexPath: delegate for each of its rows, which can result in a Significa NT performance problem with table views have a large number of rows (approximately + or more). Via Apple Document
IOS 8: "Go" uitableview performance tuning Notes