Starling engine benchmark on iPad

Having built several AIR projects on iPad, I was really disappointed over the performances delivered. I had to lower the app frame rate to a lame 12FPS in order to get acceptable interface reactivity and a minimum of GC lags. Conclusions were that, considering mobile development, the Flash engine  was out of race. I was strongly considering moving to X-Code (abandoning all hopes of ever developing something on Android), when I heard of the Starling 2D engine based on the Stage3D feature of the FP11.

So I quickly built up a simple application in order to compare conventional Flash performance to the Starling engine. The app is built using AIR 3.3 and Starling 1.2. I also used greensock’s TweenMax (could not live without it) for rotations.

The app only contains a simple button which, on each click, adds a sprite to the stage and makes it rotate:

The app, of course, also shows a FPS monitor (built in the Starling engine) in order to compare and see when performance loss are noticable.

The main MovieClip exploits the full Retina display resolution (1536×2048), just to see how it behaved and is initiated at 60FPS.

Here are the apps:

Running the apps (on an iPad 3) clearly reveals differences:

  • Standard Flash doesn’t even maintain the 60FPS with 2 sprites on stage.
  • While Starling keeps a constant FPS rate, Flash, especially with few sprites, fluctuates a lot (with 10 sprites, the delta is more than 7FPS). This behaviour tends to normalize with a greatere amount of attached sprites.
  • With a huge amount of sprites, both techniques tends to deliver the same -lame- performances.

Here is a graphical report of the tests (FPS / sprites) :