title: Sprite-kit's presentScene works slowly
body: <p>I have this piece of code:</p>
  
  <pre><code>self.view!.presentScene(Level1(size: self.size), transition: transition)
  </code></pre>
  
  <p>It's called from a menu, when I click a button, it works fine but there seems to be some kind of lag. </p>
  
  <p>I click the button and after a couple of seconds I see the transition and then the next view loads.</p>
  
  <p>Is this normal - what causes the lag?</p>
  
  <hr>
  
  <p>So after Whirlwinds comment about sound files , I removed them all, no apparent change.</p>
  
  <p>I looked at the screen with CPU , Memory etc.. when I try and load the scene CPU usage shoots up to 99% , then drops down to 80% when the scene has loaded. </p>
  
  <p>Memory is around 44%.</p>
  
  <p>So maybe that does suggest I should preload the images?  </p>
  
  <p>Would do this on the menu scene - after the first white screen, from the users point of view they wouldn't notice a couple of extra seconds of loading?</p>
  
  <hr>
  
  <p>Update: 25th April</p>
  
  <p>Im now preloading textures like this:</p>
  
  <pre><code>SKTextureAtlas.preloadTextureAtlases([
  
          tilesAtlas,
  
          PlayerShootAtlas,
          PlayerForwardsAtlas,
          PlayerBackwardsAtlas,
          PlayerIdleAtlas,
          PlayerJumpAtlas
  
      ], withCompletionHandler: { () -&gt; Void in
  
          print("----&gt; Before loaded ...")
  
          self.loadMenu()
  
          print("----&gt; After loaded ...")
      })
  </code></pre>
  
  <p>The menu scene is pretty quick to load, the only difference between the menu scene and the level1 scene is the amount of nodes that level one has, the menu scene and level 1 scene are sub classes of a game scene class.</p>
  
  <p>Will try the fonts next, </p>
  
  <p>Maybe its the way I'm loading the nodes?  </p>
  
  <pre><code>import SpriteKit
  
  class EncounterManager
  {
      var encounterNames:[String] = []
      var currentEncounterIndex:Int = 0
      var previousEncounterIndex:Int = 0
      var encounters:[SKNode] = []
      var levelYpos:CGFloat = 60.0;
  
  
      func createNodes( encounterNames:[String])
      {
          self.encounterNames = encounterNames
  
          for encounterFileName in encounterNames
          {
              let encounter = SKNode()
  
              if let encounterScene = SKScene(fileNamed: encounterFileName) {
  
              for placeholder in encounterScene.children {
  
                  let node = placeholder as SKNode
  
                  switch node.name! {
  
  
                      // entities
  
                      case "Level-end":
                          let end = LevelEnd()
                          end.spawn(encounter, position:node.position, size:CGSize(width: 72, height: 33), useLeft:false);
                          break
  
                      case "Platform-left":
                          let platform = Platform()
                          platform.spawn(encounter, position:node.position, size:CGSize(width: 72, height: 33), useLeft:true);
                          break
  
                      case "Platform-right":
                          let platform = Platform()
                          platform.spawn(encounter, position:node.position, size:CGSize(width: 72, height: 33), useLeft:false);
                          break
  
                      case "Bat":
                          let bat = Bat()
                          bat.spawn(encounter, position: node.position)
                          break
  
                      case "Bee":
                          let bee = Bee()
                          bee.spawn(encounter, position: node.position)
                          break
  </code></pre>
  
  <p>It needs to be refactored the switch statement is pretty long.</p>
  
  <p>Also Im getting, 60FPS with around 40 to 80 nodes - I don't use the simulator, only an iPhone 5  </p>