0

I'm trying to optimise some graphical routines for an app, and I'd like to know if off-screen animations (eg, [object startAnimating]) or just plain moving of a UIImageView by setting its rect (off-screen), have any processor overhead, or are they somehow ignored when off-screen?

Many thanks for any help.

SomaMan
  • 4,127
  • 1
  • 34
  • 45
  • Are you asking in general, or specifically concerning resource use on a particular device, such as an iPhone 3G's GPU? – hotpaw2 Sep 11 '10 at 00:13
  • Sorry about delay - in this case, specifically the iPhone(s), & it concerns animating sprites which frequently go on & off screen, & whether there's any need to worry about turning off the routines which position & animate them when they're off-screen. – SomaMan Sep 13 '10 at 21:13

1 Answers1

0

(1) If it involves changing pixels on the screen, there is overhead.

(2) If it involves doing something off screen that'll eventually be on screen, there is overhead.

(3) If it involves doing something that'll never be on screen, why are you doing it in the first place?

That last one, though, is very slightly snarky. Sometimes, you do need to maintain relatively visual state in a fashion that you can then retrieve information from, even though it isn't visual. Pretty few and far between, though. Without knowing more about your situation, hard to say.

bbum
  • 162,346
  • 23
  • 271
  • 359
  • Thanks for your info - the sprites in question are moving around, & go on & off-screen frequently, there is nothing which is never on-screen. I guess there's a bit of lazy programming on my part which continues to update the sprites' positions regardless of where they are, & I'd like to know if this could be slowing things down (I do aim to do my own tests eventually...). – SomaMan Sep 13 '10 at 21:17