Skip to main content
Inspiring
November 24, 2011
Question

Performance in Android 3.0 and beyond

  • November 24, 2011
  • 10 replies
  • 1754 views

I have some concerns on performance for any version of android 3.0 and above.  Dragging a movieclip is choppy.  Pinch and zoom is terrible (disabled on tablets in favor of +- zoom controls).  Rotation is very choppy as well. 

I thought this was limited to large screens and since my focus was small screens and performance on small screens was smooth, it wasn't an issue.  Gingerbread works like butter for my app.  However, I have recently tried my app on small screen Android 4.0 and it has the same issues as 3.0 on tablets so I am starting to think it isn't just screen size but an issue with changes in the OS.  I realize ICS just came out but since AIR 3 is suppose to target Android 3.0 API's and the same issue exists, it leads me to believe that ICS phone users will suffer the same problem.  I think if I can figure it out for supported Android 3.0, it will also solve the 4.0 problem before the masses adopt ICS.

Anyone else have issues on honeycomb with performance?

This topic has been closed for replies.

10 replies

iBr3nt
Inspiring
March 6, 2012

Between AIR 2.x and 3.x some defaults have changed in regards to color depth and rendering quality.

Try setting stage.quality to StageQuality.LOW or StageQuality.MEDIUM in your constructor function:

stage.quality = StageQuality.LOW

Another thing to do regardless of the stage.quality setting, is to make sure you have the color depth tag set in your -app.xml file. So if you're using AIR 3.1, add the following tag in your -app.xml file within the <android> tag:

<colorDepth>16</colorDepth>

Let us know if that makes a difference.

iBrent

mola2alexAuthor
Inspiring
March 7, 2012

Thanks.  I do have the stage quality at medium but not much difference.  I did export some of my vectors as bitmaps (using Flash Pro) and that made a pretty big improvement on the sluggish areas.  I also turned on GPU acceleration which also helped.  I would say those changes helped bring it up to an acceptable level.  I did not notice any difference in colorDepth.

I have a couple related questions.  Bit of background, my app allows you to draw using your finger.

1) Are touch event better than mouse events for drawing?  In some test apps (drawing only), touch seemed to work much smoother but when I layer in other graphics, not really a difference, when should I use mouse vs touch?

2) are there any better api's for drawing than Adobe graphcis?

Thanks

Inspiring
January 31, 2012

Just one question: Do you use cacheAsBitmap?
Incredible enough, but if I turn cacheAsBitmap and cacheAsBitmapMatrix Off it works better. Not perfect but better.

mola2alexAuthor
Inspiring
January 31, 2012

I have tried cacheAsBitmap, GPU rendering and many things and it never works as good as gingerbread.  the pinch zoom code I was using on gingerbread that worked like butter is now really flaky as well.  I think it has somethign to do with how Google changed Android to accomodate different screen sizes and pixel densities.  I really hope Adobe can sort this out but based on this thread, not sure many others are having this issue. That or no one is making apps with Air.

February 1, 2012

I have the same problem! With Android 4.0!

If this is a bug and I think so Air for Android ist usless! It´s impossible to make smoth animations in any kind! After I have detcted that cacheAsBitmap is slow I have tried to use copyPixels in one bitmap! The same bug... also incerdible slow.

Do you know if Adobe people answer here some time?

Inspiring
January 30, 2012

I have the same problem with a new Galaxy Nexus Android 4.0! All my work is useless now! The App runs on Galaxy S2 with smooth 60 fps. On the Nexus its an desaster.

mola2alexAuthor
Inspiring
January 30, 2012

And here I thought it was just me...I haven't had much more success speeding things up besides some optimizations that really don't improve it that much.  Needless to say my next project will not be in AIR for Android.

Inspiring
January 30, 2012

I have isolated the problem! The performance drops if I add or remove anything fromthe display list! Even if its only a 10 x 10 px bitmap!
Don´t you think it´s an bug in the air runtime?