title: UICollectionView: Smooth scrolling with many visible cells
body: <p>I'm trying to optimize the scrolling speed and smoothness of my <code>UICollectionView</code> (using a custom layout) that has about 400 cells, 150 of which are visible on the screen at the same time.</p>
  
  <p>The cells themselves aren't very complex: They consist of a (fully opaque) colored background and two labels (with the same background color).</p>
  
  <p>So far, I've read dozens of posts on optimizing speed by</p>
  
  <ul>
  <li>properly reusing cells,</li>
  <li>avoiding transparency in all backgrounds,</li>
  <li>avoiding box shadows,</li>
  <li>avoiding corner radius, and</li>
  <li>avoiding fractional cell positions and sizes.</li>
  </ul>
  
  <p>Despite all these optimizations, I still can't scroll smoothly with 60 fps. I've also tried layer rasterization (<code>shouldRasterize</code>) after dequeuing cells, but that had a negative impact on performance.</p>
  
  <p>Reducing the amount of cells that are visible at the same time is the only thing that improved performance — scrolling is totally smooth with fewer cells. Unfortunately, that's not an option.</p>
  
  <p>What else can I do to get close to 60 fps with many <code>UICollectionViewCell</code>s visible at once?</p>