Mar
Mar

Reputation: 323

Actionscript: performance of creating text fields and fills on iOS

I am curious to know what sort of performance I can expect from Air on iOS. I have a class which creates 30 display objects each with several text fields and a fill.

Each display object takes about 0.011 seconds to create on my PC. This raises to 0.056 on an iPad Retina (A7).

From my debugging it takes around 0.004 to create and format a textfield.

When I get to 30 display objects the 0.056 becomes 1.68 seconds.

Is this typical?

Can anything be done ?

I have traced each and every stage of the class and every function is taking about the same time to execute, so I do not think one specific stage has an issue.

Upvotes: 0

Views: 52

Answers (1)

Organis
Organis

Reputation: 7316

Welcome to the world of mobile devices. They all have a very low (if you compare to that of desktop PCs) CPU power, while Flash uses CPU to render its content normally.

  • the larger area you need to redraw on the screen - the worse performance is
  • the more objects are there to draw - the worse performance is

Shapes, strokes, fills, fonts - they all are vector data that Flash need to render and draw, thus they all take a heavy toll on CPU usage, which also results in heavy battery drain. That's why Apple discontinued supporting Flash Plugin on their devices long ago.

Then Adobe announced Stage3D which allows (with a certain dose of work) to take advantage of GPU-rendering, which is faster even on desktop computers, and literally saves the day for Flash/AIR application on mobile devices.

Long story short, slow performance is the way things are for native Flash content. If you want better performance and faster applications on mobile devices, you need to proceed with some GPU-enabled framework, like Gamua Starling.

Upvotes: 2

Related Questions