Jerky/juttery (core-)animation in a screensaver
Jerky/juttery (core-)animation in a screensaver
- Subject: Jerky/juttery (core-)animation in a screensaver
- From: Phillip B Oldham <email@hidden>
- Date: Wed, 17 Jun 2009 19:51:12 +0100
I've built a screensaver for Leopard which utilises core-animation. It
doesn't do anything overly complicated; uses a tree of CALayers and
CATextLayers to produce a "table" of data in the following
structure/levels:
- root
› maincontainer
› subcontainer
› row [multiple]
› cell [multiple]
› text layer
At most there are 50 CALayers rendered on the screen at any one time.
Once I've built the "table", I'm adding animating the "subcontainer"
into view using CABasicAnimation. Again, I'm not doing anything fancy
- just a simple fade-in.
The problem is that while the animation does happen its painful to
watch. It's jerky on my development machine which is a 3.06Ghz iMac
with 4GB of RAM, and seems to chop the animation into 10 steps rather
than showing a gradual change.
It gets worse on the ppc mac-mini the screensaver is targeted for; it
refuses to even play the animation, generally "tweening" from the
beginning of the animation (0% opacity) to half-way (50%) then
completing.
I'm relatively new to ObjectiveC and my experience is based on using
garbage-collected environments, but I can't believe I'm leaking enough
memory at the point the screensaver starts to cause such problems.
Also, I'm quite sure its not a problem with the hardware. I've tested
the built-in screensavers which use core-animation, and downloaded a
few free CA-based for comparison, and they run without issue on both
machines.
Information is pretty thin on Google with regards to using CA in
screensavers, or using CA in general for that matter, and
advice/tutorials on profiling/troubling screensavers seems to be
non-existant, so any help the community can provide would be well
received!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden