IOS 8: "Go" uitableview performance tuning Notes

Source: Internet
Author: User

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.

    1. Network images are loaded asynchronously, sdwebimage.
    2. Text directly Drawinrect/drawatpoint drawing, refer to Abtableviewcell,advancedtableviewcells.
    3. Local images can also be drawn directly, or added to the display using Calayer.
    4. Cell reuse mechanism.
    5. The cell content avoids the transparency effect as much as possible.
    6. If not necessary, reduce reloaddata all cells, only reloadrowsatindexpaths.
    7. 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.
    8. If the cell content placement is not fixed, it will be cached after the first calculation.
    9. If the cell height is fixed directly with the cell.rowHeight height, do not implement tableView:heightForRowAtIndexPath: delegate.
    10. Cell content parsing operations (especially complex parsing) are performed asynchronously with pre-execution, and the parse results are cached.
    11. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.