Slow performance on Android 3.0

Hi, we have 3 games live on the 3 main markets. apple, google and android and we are about to release our 4th game this week if all goes well.

Until now everything worked very well, but last week we have purchased two honeycomb based tablets (samsung tab 10.1 and asus transformer) and we are experiencing a huge drop in fps across all our games.

we do not have any issues with android phones or ios devices, all these hit 60 fps but the honeycomb devices are struggling to hit even 20 fps.

I really have no clue what this is so i dont have any code to post…

I did notice that when i ran the apps in zoom mode instead of stretch (chose it in the bottom android task bar) the game runs smoothly but the textures look really bad…

I also checked for mem usage and our maximum texture mem usage is 16mb.

I really dont think our code causes this slowdown because i would expect it to show on other android devices… But the fact is my 2 year old 1ghz single processor htc desire hd runs 4 times faster than my new samsung tab 10.1 that has a dual core tegra 2.
Is anyone else experience this? We are now in the process of getting a kindle fire to see how well it runs on it [import]uid: 80469 topic_id: 20822 reply_id: 320822[/import]

off the top of my head - u using sound?

you may want to preload some of the most used sounds ahead of time - file io suffers in some devices while game play.

also what type of sound format are you using?
c
[import]uid: 24 topic_id: 20822 reply_id: 82019[/import]

Hi Carlos, thanks for the quick response.

Yes we are using sound. MP3 files, only very should “click” sounds which are pre-loaded using audio.loadSound, and then played back with audio.play

We will try removing the sounds and we’ll report back. [import]uid: 80469 topic_id: 20822 reply_id: 82172[/import]

use loadsound for short sound sounds if greater than 30 secs use loadstream

c
[import]uid: 24 topic_id: 20822 reply_id: 82283[/import]

are you incurring any io operations when you see the slowdown?

c.
[import]uid: 24 topic_id: 20822 reply_id: 82305[/import]

No we are not, but let me give you some more information

We use crawlspaceLib to measure FPS, not sure if that’s valid for you but here are some results from todays testing:

  1. We see that the FPS is much lower on our Android 3 tablets. The extreme example is our main menu which only has a few static buttons, a background and some title logos all as images. On a not too strong android phone I see close to 60 FPS On the tablets we see something in the area of 20 FPS.
  2. We have removed all the sounds from our code, didn’t even load them but this doesn’t effect performance.
  3. We have removed all high resolution resources in attempt to see maybe the larger resources are causing this.
  4. We have disabled all the enterFrame listeners in our code to make sure we are not causing this lag.
  5. We do see extra slowness when showing an ad (we are testing the inneractive API)
  6. When we switch to zoom/compatibility mode on the tablet itself it loads the game in a much lower resolution (x2? I don’t know) but we see _no_ slowness even with all our code and sounds (which are both do not relate to the screen resolution in any way) so we are really afraid something with Honeycomb is different.
  7. In the system log we do see a lot of entries saying a touch event has been delivered to our app yet we don’t think this is a issue and it correlates to actual touch event we’ve really done. The reason I’m mentioning this at all is I read in old forum posts about those nasty touch issues people experienced but that was quite a while ago.

Do you see any obvious reason why an app should suffer from a slowdown only when it’s ran in a none compatibility mode on honeycomb? I can assume you that the number of objects we are working on doesn’t relate to the screen resolution it is constant no matter what device you use.

I know Honeycomb is practically dead (and I’m also sorry for causing you to spend your time on it :)) with ICS coming out soon and I’m assuming we won’t see this on Kindle Fire because it’s not honeycomb but it would still be nice to target those devices that are out there…
[import]uid: 80469 topic_id: 20822 reply_id: 82362[/import]

Ok I think we found the cause for this slowness, I’m not sure it’s directly related to Corona…

The problem is that for some reason on larger screens the blending of a lot of overlapping images is simply killing us.

For example, our main menu comprises of a frame, title, a few transparent buttons and 50 flakes that fall at different rates, each time a flake get out of screen it is recycled up. all these flakes are moved with enterFrame.

Everything works smoothly at close to 60fps until we open a semi transparent popup on top of this scene. The fps drop dramatically to below 30fps.

Here is the strange part:
I have both an HTC Desire HD which is quite old with a 4.3inch display and also a newer HTC Sensation XL with a 4.7inch display. Both are running Android 2.3.x

On the older device even with the popup on I still get 60fps, only if I open like 3 popups one on top of the other (not something that should happen I’m just testing) I see the performance drop.

On the newer device I see the same drop i see on tablets even with one popup open.

I should mention that even when I disabled our enterFrame I see these drops, less but still visible.

Our game is not consuming a lot of texture memory but it’s very blending intensive with a lot of glass layers and glows that we just put one over the other. I’m thinking maybe we should pre-blend all these layers offline in photoshop and use them like that, but I wanted to know maybe you have some other ideas because it does reduce our flexibility in code (we adjust alpha levels of each layer now depending on the scenario)

Is blending really known to be so intensive on the GPU? should we avoid transparencies where possible? [import]uid: 80469 topic_id: 20822 reply_id: 84081[/import]

I find this post misleading now that I found the issue. This is not related to Android 3.

I’ve posted something with a more relevant title here:
http://developer.anscamobile.com/forum/2012/02/02/understanding-poor-blending-performance
[import]uid: 80469 topic_id: 20822 reply_id: 84171[/import]

If you look at this page:

http://developer.android.com/guide/topics/manifest/application-element.html

You’ll see there’s an attribute called “android:hardwareAccelerated”. After decoding the apk of my app to be able to read the AndroidManifest.xml, I have not seen it.

Could it have some relationship? [import]uid: 46216 topic_id: 20822 reply_id: 85791[/import]