My app architecture / hierarchy looks like this:
UIView
UIView
CALayer | CALayer | CALayer | CALayer .... (and a few hundred more)
These CALayer instances represent small square dots in a dot matrix display for an fast countdown clock. I'm updating their backgroundColor as often per second as possible. Actually what I want is 60 times per second, but I guess the device can't do that.
I have an timer which calls an method frequently. This method then iterates over those pixel-dot layers and sets their backgroundColor to whatever is needed right now.
What optimization tips do you have to improve performance?
One thing that comes to my mind:
1) Tell every CALayer that it's opaque!
I guess there are a lot more optimization possibilities. Maybe not a flat hierarchy like I have, but a very deep one, where every CALayer is a sublayer of another? Not sure.