title: Why frequent switching hidden property of CALayer causes extreme graphics degradation?
body: <p>I am writing <strong>IOS</strong> app where many <strong>CALayers</strong> (hundreds) are displayed at the same time on screen. Update of interface (at rate about <strong>50-60Hz</strong>) includes removing/adding some <strong>CALayers</strong> from/to layers hierarchy and changing "hidden" state of other <strong>CALayers</strong>. All updates are made under common <strong>CATransaction</strong> with <strong>ANY</strong> animations swithed off.</p>
  
  <p>Frequent removing/adding <strong>CALayers</strong> from hierarchy doesn't lead to any problems with graphics performance. But frequent changing of "hidden" state of <strong>CALayers</strong> leads to degradation of FPS so graphics updates stop being smooth and stable. It seems that <strong>GPU</strong> always late with processing updated screen.</p>
  
  <p>Does anyone know what is the reason for this effect? In official documentation there is no any word about such side effects of hiding/showing layers. Adding/removing and hiding/showing layers seem to have similar consequences to what is made with layers: when layer is hidden it is just not processed at all what is equivalent to being removed (except maybe that it is still cached somewhere in GPU..?). Maybe someone can explain that or faced the same problem?</p>