Reasonable Android game performance

So I’m getting terrible performance on my Galaxy S3 for a scene that is pretty reasonable in my opinion.

The vertex/triangle counts are about what they should be, and the object counts are relatively low as well.

Stat screenie:

Of course on the computer this gets a perfect 60 FPS with VSync enabled. As far as I can tell, I’ve disabled verbose logging (not sure if that’s still an issue) with the following code:

[java]
Logger.getLogger("").setLevel(Level.SEVERE);
Logger.getLogger(“com.jme3”).setLevel(Level.SEVERE);
[/java]

Material is unlit, each colored square is a single object with an 8x8 grid of smaller squares (two triangles), and no animation or anything fancy is being done. I do have a custom camera but that shouldn’t be an issue at all.

I should also mention I’m using the latest build.

What gives? Surely this can’t be standard Android performance… Why would anyone bother?

EDIT: Alright, weirdly enough, after disconnecting the cable during a debug session, the framerate spiked back up to 60 FPS. Now, after plugging it back in, the framerate is fine at 60 during each debug session.

Is there reasoning for this?

EDIT EDIT: Huh. Debugging the app kills performance completely. No, I’m not logging at all, it’s just the fact that it’s debugging. The second I hit Eclipse’s “Disconnect” button, framerate spikes up. Running the application normally also has perfect performance.

Should make a note of this somewhere, would have saved me hours of wasted optimization…

@JDBallard said: EDIT EDIT: Huh. Debugging the app kills performance completely. No, I'm not logging at all, it's just the fact that it's debugging. The second I hit Eclipse's "Disconnect" button, framerate spikes up. Running the application normally also has perfect performance.

Should make a note of this somewhere, would have saved me hours of wasted optimization…


Uh wait you mean if you unplug the phone from the computer it gets faster?
I never noticed that with the SDK, we can’t write things about things we don’t know.
That said you could write it the wiki, it would save hours of wasted optimization to the next guy using eclipse.

I do not know anything about Android, but running something in debug mode usually is a lot slower than running in production mode. This because the program has to log and gather all data needed for the debugger to work.

<cite>@nehon said:</cite> Uh wait you mean if you unplug the phone from the computer it gets faster? I never noticed that with the SDK, we can't write things about things we don't know. That said you could write it the wiki, it would save hours of wasted optimization to the next guy using eclipse.

While this thread was prompted while using Eclipse, I had the same results in SDK before I decided to switch to an Eclipse setup.

I’ll go ahead and make a note of it.

EDIT: Added to Android wiki page

2 Likes
@JDBallard said: I'll go ahead and make a note of it.

EDIT: Added to Android wiki page


Thanks

1 Like