XCode7-iOS9 performance issues with deep scene graph

Our studio was developing a slot project in Cocos2d using Spritebuilder, however with the latest features available in Sprite-Kit we have decided to convert this ongoing project to Sprite-Kit.


We are experiencing some performance issues with deep scene graphs where the CPU usage seems to escalate and cause a drop in frames. At first I thought it was something in our code but I was able to recreate the problem starting from a blank Sprite-Kit template project. I have added a link to the sample project.


Sample Project Link: https://dl.dropboxusercontent.com/u/966509/test2.zip


My scene graph is as follows and uses reference nodes to create the scene graph depth:


GameScene -> GameView -> SlotView -> Reel -> TileContainer -> Tile. I should note that there are 5 reels in the scene and each reel contains 5 tiles. This totals out at around 50-60 nodes at a depth of about 6 in the tree graph. I believe most of the nodes are skspritenodes. My actual project has a deeper tree graph and the performance is even worse. However, using the test project you can easily add 100's of sprites to the screen by tapping without a drop in performance. This leads to my conclusion that the performance is related to nested nodes and deep scene graphs. Or it could be related to the use of reference nodes.


I am testing on an iPad 3 with ios9 beta 2. I see frames drop into the 45-50 fps range with this scene graph. The same scene graph performed at 60 fps with cocos2d.


My question is: Is this a limitation of Sprite-Kit where I need to rearchitect to make sure we don't have a deep scene graph? Or is this simply beta performance and we can expect improvement with the final release?


Also the flag to show draw count and node count doesn't appear to work in the beta.

Did Beta 4 help at all? I'm having similar issues.; CPU usage jumped three fold updating from 8.3 to 9.0. I'm starting to get a bit worried now with my project since Beta 4 didn't improve performance.

Same problem. Animation twitches... Processor slows... In complex scenes performance is horrible (but same project in iOS 8 is ok).


I really worry about SpriteKit and iOS 9.

same problem as this thread: https://forums.developer.apple.com/thread/14487


the problem remains in iOS 9 GM!!!

Hello everyone.


I am experience slow, laggy performance as you and the other developers.

in iOS 9 GM & iOS 9.1 Beta slow fps performance.

Very slow fps during scene transition fps range 35-5X.


In iOS 8.x i get 60fps using same scene.


iOS 9.1 Beta show a little better fps than iOS 9.0 GM but not even close to smooth performance in iOS 8.


I encourge all who are experience this to use the bug reporter so this issue can get high priority.


/Indiedeveloper

Posted over on this similar thread...


https://forums.developer.apple.com/thread/14487


Same issue, framerate tanks for SpriteKit game in iOS9 GM. Filed bug report. This is a major issue.

XCode7-iOS9 performance issues with deep scene graph
 
 
Q