Measuring the UITableView Scrolling Performance - iphone

前端 未结 2 595
礼貌的吻别
礼貌的吻别 2021-02-01 10:05

I am trying to measure the scrolling performance for my UITableView, between using subview and drawing the view myself. As we may know about scrolling performance, there are a c

相关标签:
2条回答
  • 2021-02-01 10:17

    Firstly, I will confirm that if you have a lot of subviews, you WILL get huge performance benefits using drawRect and the Tweetie method (for example). We have a project where each cell has something like 14 sub-views and it ran like treacle on older devices. Having moved to doing it directly, it runs at iphone4 speeds even on old 3G (not 3GS) devices.

    So it IS worth it.

    Measuring wise though, you're measuring at the wrong point. You are measuring the time to either dequeue a cell or init a new one, neither of which have anything to do with the time it takes to render on screen.

    0 讨论(0)
  • 2021-02-01 10:39

    I'd suggest using Instruments rather than trying to run the test directly in your code. The Core Animation tool will track the actual number of frames per second (FPS) that your app’s displaying.

    0 讨论(0)
提交回复
热议问题