How to Improve tableView performance and tableView Performance
A. Reuse cell
We all know that it takes time to apply for memory, especially frequent memory application within a period of time will cause a great deal of overhead, and the cell layout is the same in most cases in tebleView, at this time, we can improve the performance through the recycling mechanism.
B. Avoid re-layout of content
Try to avoid re-layout the cell when reusing the cell. Generally, the cell is well laid out when the cell is created.
C. Use an opaque subView
When customizing the cell, setting the subView to be added to an opaque state will greatly reduce the time required for rendering when multiple view layers are stacked.
D. If convenient, directly reload the drawRect method of subView.
If multiple small elements are required during cell customization, it is best to draw multiple projects to be displayed directly, instead of adding multiple subviews.
E. do not implement the delegate method of tableView unless necessary.
Many delegate functions in tableView further control cell attributes, such as the height of each cell, whether the cell can be edited, and the supported edit style, if not necessary, it is best not to implement these methods because the quick call of these methods will also affect the performance.