performanceios9rounded-cornerscornerradiusoff-screen

How does cornerRadius and offscreen rendering affect performance in iOS 9


Setting cornerRadius and masksToBounds will lead to offscreen rendering, so that it will affect the performance when scrolling the table. Though this has been mentioned a lot before, does anyone ever make an experiment about this in iOS 9?

Here is my demo, It seems that setting cornerRadius doesn't have any influence on scrolling performance. On my iPhone 6, the average fps is still 57 or 58.

Does iOS 9 make any optimization or I did something incorrectly?

By the way, I noticed that when the UIImageView is a square(width = height), setting conner of some UIImageView will not lead to offscreen rendering. How does this happen?


Solution

  • It seems that I didn't add enough images to the cell. When the number of presenting images reaches 30 or more, the influence on performance becomes apparent. The average fps drops down to 33.