dissapointing android performance

I have an app that is about to be release (already approved by iOS releasing tomorrow)
I was hoping I could optimize my android version until then but I have failed, the performance for android version is just not on par with iOS version, even given SLOWER hardware.

I tested my game and it’s at 60 fps on iphone 3gs, I tested the same game built for android on a 1ghz snapdragon htc evo, it stutters and barely playable. What gives? I tried several optimization techniques, localize variables that I could, someone suggested me the garbagecollection(‘step’) trick, nothing.

Apparently a bunch of other people are reporting the same issue, this is very disappointing to me, can someone please shed some light on this? I am really disappointed at corona right now. [import]uid: 11334 topic_id: 12129 reply_id: 312129[/import]

Hey there,

Can you tell me, is that an armv7 device? Or armv6?

Peach [import]uid: 52491 topic_id: 12129 reply_id: 44185[/import]

Even though the 3GS is quite a bit older it actually has a better graphics processor than the EVO. Are you using a lot of transitions? The transition.to API seems to have performance issues on Android devices. [import]uid: 27965 topic_id: 12129 reply_id: 44189[/import]

@peach it is armv7, would that change anything?
@calebr2048: there are no transitions, however it is physics based and it’s already showing slowness at 3-5 physics object on screen. [import]uid: 11334 topic_id: 12129 reply_id: 44241[/import]

Yes, there is no support for armv6 Android devices. [import]uid: 52491 topic_id: 12129 reply_id: 44382[/import]

I am feeling your pain. I am in the same boat. My performance is as tune as I can think of…no slowness issue (thank God), but weird differences like my sounds are off on android, the resistive screen make the game seems bad, while the capacitive screen give a more smooth. I was actually trying to see which forum I can use to write an entire article about my experience during my development cycle, and various things I had to learn about the different 3rd party tools (Transition manager, Director class, text and particle candy, etc). Also, my game fire bullets so fast, that sometimes it would miss a sound, so I had to used alternating channels for the same channel. I am hoping others starting out with Corona SDK can benefit from what I went through.

At one point I did notice that my game slowed down after playing for a few minute, and this was due to increase memory usage, and I had to spend an entire day on memory management. since, then I have not ran into that issue again.

I am willing to help in anyway I can. I like Corona and would like to do my part to support the community in anyway I can. [import]uid: 55144 topic_id: 12129 reply_id: 44391[/import]

I did not create the following, but came across it when I was dealing with my slow down issue. Use the following code, and lauch Corona using the terminal option, watch check the terminal as your game is running.


local monitorMem = function()

collectgarbage(“collect”)
print( "\nMemUsage: " … collectgarbage(“count”) )

local textMem = system.getInfo( “textureMemoryUsed” ) / 1000000
print( "TexMem: " … textMem )
end

Runtime:addEventListener( “enterFrame”, monitorMem)


p.s. if you already have a enterframe event listener, just call monitorMem() [import]uid: 55144 topic_id: 12129 reply_id: 44432[/import]

@support47 thank you support47, I am pretty desperate and i am not getting any response from Corona themselves, I have exhausted all routes.

I am skeptical that it is a texture memory issue but I will try anyway, the reason is that when the game just starts it already starts slowing down, this behavior is not present in iOS and I do have the same issue with non responsive touch that you experienced as well.
PS: what should I observing? abnormal texture memory usage? or?

@peach pellen: now that the processor type is not the issue, what else can I do?
[import]uid: 11334 topic_id: 12129 reply_id: 44453[/import]

Are you using the current released SDK or the latest Daily builds? I’ve noticed some significant Android performance improvements in most of the latest builds.

  • Stephen
    Kigra Software [import]uid: 4639 topic_id: 12129 reply_id: 44455[/import]

@ SteveK oh yeah definitely, after they only support armv7 or android 2.2+ we get significant boost definitely but it’s still nowhere near iOS performance, does your game use physics? how does your game perform? [import]uid: 11334 topic_id: 12129 reply_id: 44459[/import]

The main thing I wanted you to look at was the total memory usage. I notice my game slowed down when I started using 1500Kb or higher.

My game was done to get the learning curve out the way. I am starting a new project shortly. But, you can see my game “Neutral Zone” in the Corona showcase under newest additions.

It does use Physics.

My game uses

  • Physics
  • Sprites
  • Audio - File I/O
  • Facebook - NativeUI

3rd Party tools

-Director
-Tansistion Manager
-Beebe Game Module
-Text Candy
-Particle Candy

  • [import]uid: 55144 topic_id: 12129 reply_id: 44463[/import]

I use physics, sprites and audio , so far i havent had any problems with the audio other than the suspend bug.

out of all the third party tools I use director…

Im gonna check for texture memory usage, it’s sad that I can’t release on the market, at the same time I release on app store…

I’ll report back after I get the result.

[import]uid: 11334 topic_id: 12129 reply_id: 44468[/import]

Make sure you have all paperwork done for app store, so your only delay will be waiting for them to approve the app. Android approve apps pretty fast, apple not so fast. It you are going to sign up with apple as a company name, then the delay could be even longer [import]uid: 55144 topic_id: 12129 reply_id: 44477[/import]

It uses some physics, but not as a part of the game play. I make a lot of use of transitions but other than that do not tax the hardware much. And no, still not as good as iOs, but at least it is heading in the right direction.

  • Stephen [import]uid: 4639 topic_id: 12129 reply_id: 44487[/import]

I’d be interested to hear the result; the above posts are worth listening to in any case.

Android is improving as SteveK said :slight_smile: [import]uid: 52491 topic_id: 12129 reply_id: 44561[/import]

Ok, i’ve done the memory usage test

texturememory hovers around 5 and memory goes from 390 something all the way to 500 and then goes back again to 390, I think this is the part where garbage collection kicks in.

Here is the report:

MemUsage: 388.2470703125
TexMem: 5.020672
.
.
.

MemUsage: 416.798828125
TexMem: 5.021696
.
.
.

MemUsage: 491.8173828125
TexMem: 5.021696
.
.
.
MemUsage: 389.5517578125
TexMem: 5.020672
.
.
etc

This is over 10 minutes of gameplay, does this answer anything?
I hope 5.0 for texture memory is not too much, I mean, it only has few graphical elements on the screen. [import]uid: 11334 topic_id: 12129 reply_id: 44620[/import]

anyone? Carlos? [import]uid: 11334 topic_id: 12129 reply_id: 44876[/import]

code !

there is no way to tell what is wrong without any code

what device are you running on ? and what build of corona?

you mention you are using the director class?

we found several impending p4mance penalties due to the way users load and unload images/sounds using the director class and timer:performwithdelay ( ms ) the ms on android is at best the a POS
c. [import]uid: 24 topic_id: 12129 reply_id: 45024[/import]

@Carlos I would show the code if I know which one to show? I am not able to pinpoint specific part of the code. I will send you an email and report back here for the result, since there are others reporting the same thing, the result would definitely help them. [import]uid: 11334 topic_id: 12129 reply_id: 45060[/import]

I too seem to have slow downs on my Desire HD. Happens around the third level, I used the code above and get between 240 and 350 for the mem Usage and around 11 for the Texture Memory, no idea if that is a lot or not!

I am not using daily builds only the latest build that is downloadable without logging in.

Off Topic: Am I right in thinking the back button cannot be detected in the non daily builds?

Thanks [import]uid: 72726 topic_id: 12129 reply_id: 57570[/import]