I created a screensaver for Leopard that uses core-animation. He does nothing overly complicated; uses the CALayers and CATextLayers tree to create a โtableโ of data in the following structure:
- root โบ maincontainer โบ subcontainer โบ row [multiple] โบ cell [multiple] โบ text layer
At best, 50 CALayers are displayed on the screen.
Once I have built the โtableโ, I add the animation of the โsubcontainerโ to the field of view using CABasicAnimation. Again, I am not doing anything unusual - just ironing.
The problem is that although the animation is really painful to watch. This is jerky on my development machine, which is an iMac 3.06 GHz with 4 GB of RAM and seems to slice the animation in 10 steps, rather than showing a gradual change.
On mac-mini ppc worse, a screen saver is for; he refuses to even play the animation, usually "tweening" from the start of the animation (opacity 0%) halfway (50%), and then ends.
I am relatively new to ObjectiveC, and my experience is based on using garbage-collected environments, but I cannot believe that I have enough memory at the very moment the screen saver starts to cause such problems.
In addition, I am sure that this is not a hardware problem. I tested the built-in screensavers that use core-animation, and downloaded several free CA-based ones for comparison, and they run without problems on both machines.
The information is pretty thin on Google regarding the use of CA in screensavers or the use of CA in general in this regard, and the tips / guides for profiling / alarming screens seem to be non-existent. Therefore, any help that the community can provide will be welcome!
--- UPDATE ---
Implicit animations seem to help smooth things out a bit. Still disgusting, but not as bad as trying to animate everything with explicit animation, as in my solution.