title: Why is my iOS App taking so much memory and CPU?
body: <p>I have this simple app that has a simple menu screen. But for some reason the memory is over 130 mb and CPU always rises above 80 percent. Is this normal? or am I doing something wrong?</p>
  
  <p>Here is the profiling image:</p>
  
  <p><a href="https://i.stack.imgur.com/R3KpY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R3KpY.png" alt="enter image description here"></a></p>
  
  <p>Here is the menu scene:</p>
  
  <p><a href="https://i.stack.imgur.com/gsfCv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gsfCv.png" alt="enter image description here"></a></p>
  
  <p>Here is the debug navigator:</p>
  
  <p><a href="https://i.stack.imgur.com/C5cFV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C5cFV.png" alt="enter image description here"></a></p>
  
  <p>Here is the code:</p>
  
  <pre><code>import UIKit
  import SpriteKit
  
  class GameViewController: UIViewController {
  
    var gameScene: SKScene!
    var skView: SKView!
  
    override func viewDidLoad() {
      super.viewDidLoad()
  
      NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(GameViewController.changeScene(_:)), name: "ChangedScene", object: nil)
      skView = self.view as! SKView
      gameScene = IntroScene(size: skView.bounds.size)
      gameScene.scaleMode = .AspectFill
      skView.presentScene(gameScene)
    }
  
    func changeScene(notification: NSNotification) {
  
      let message = notification.userInfo!["sceneName"] as! String
  
      let transition = SKTransition.revealWithDirection(.Left, duration: 1.0)
      if message == "SelectScene" {
        gameScene = SelectScene(size: skView.bounds.size)
        skView.presentScene(gameScene, transition: transition)
      }
  
      if message == "MatchingGameScene" {
        gameScene = MatchingGameScene(size: skView.bounds.size)
        skView.presentScene(gameScene, transition: transition)
      }
  
      if message == "SoundGameScene" {
        gameScene = SoundGameScene(size: skView.bounds.size)
        skView.presentScene(gameScene, transition: transition)
      }
    }
  
    override func shouldAutorotate() -&gt; Bool {
      return true
    }
  
    override func supportedInterfaceOrientations() -&gt; UIInterfaceOrientationMask {
      if UIDevice.currentDevice().userInterfaceIdiom == .Phone {
        return .AllButUpsideDown
      } else {
        return .All
      }
    }
  
    override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Release any cached data, images, etc that aren't in use.
    }
  
    override func prefersStatusBarHidden() -&gt; Bool {
      return true
    }
  }
  </code></pre>
  
  <p>As you can see the memory usage is 130mb and CPU is over 80 percent. Is this normal? I was expecting it to be much smaller than 130mb and 80 percent because the entire app file including images is just a bit over 2.5 mb. Why is this happening?</p>