Skip to main content
Inspiring
July 6, 2012
Answered

CPU usage steadily climbing to 70% on almost blank screen

  • July 6, 2012
  • 2 replies
  • 577 views

Hi there,
This problem has been plaguing me for almost a month.
This is an iOS app. On one screen which has just 4 button components at the bottom, a 320*400 square and nothing else the CPU usage is always observed to climb from 20% to 70% in the space of 1 minute at which point it drops only to begin climbing again. There is no code being executed and the memory does not increase.
This is 320x460 (windowed, non retina) in GPU mode.
Thanks for reading.
Luke

This topic has been closed for replies.
Correct answer luke_luke_luke

It turned out to be an offstage MovieClip that I hadn't referenced in any code other than creating an instance. You would assume when a display object without code is offstage it would use less cpu and ram. wouldn't you ? Well not in this case. It had 6 tiny 10X10 Movieclip children that when on stage are always told to gotoAndStop at one of three frames. When off stage the bloody things were looping and for some reason causing these increases in memory and cpu...dang im such an idiot. Learnt a big lesson there

2 replies

luke_luke_lukeAuthorCorrect answer
Inspiring
July 7, 2012

It turned out to be an offstage MovieClip that I hadn't referenced in any code other than creating an instance. You would assume when a display object without code is offstage it would use less cpu and ram. wouldn't you ? Well not in this case. It had 6 tiny 10X10 Movieclip children that when on stage are always told to gotoAndStop at one of three frames. When off stage the bloody things were looping and for some reason causing these increases in memory and cpu...dang im such an idiot. Learnt a big lesson there

Inspiring
July 6, 2012

actually the memory is showing similar behavior of increasing and then dropping back down (remember no new objects are being created and no code is running)