2
\$\begingroup\$

So after weeks of thinking my rendering code was bad, I accidentally discovered the following:

Running my game on a Nexus S

  • From Eclipse (Debug as -> Android application): 12fps
  • From the device while still attached to USB (getting log info in Eclipse still): 24fps
  • From the device while not attached via USB: 56fps

I was wondering if anyone else has issues like this? I mean, the problem really isn't a problem since the final release build will likely have good performance, but for the time being I don't want to have to keep (un)plugging my device in and out when testing code all day long.

Is there some remedy for this or does anyone have any input/advice?

Thanks.

\$\endgroup\$
3
  • \$\begingroup\$ I don't use Eclipse, but I do not have these issues while running from Android Studio; except of course when the Debugger is attached, but that is to be expected. Have you considered using an emulator (such as Genymotion) instead of your device for your daily runtime environment? I use this setup (it runs as fast/faster than my Nexus 4) and then only do device testing when needed (i.e. at various milestones). Of course this won't work if you need multi-touch or gyro support. \$\endgroup\$
    – free3dom
    Oct 8, 2013 at 21:28
  • \$\begingroup\$ I think this should be on StackOverflow rather than here since it really has nothing to do with gamedev. \$\endgroup\$
    – you786
    Oct 9, 2013 at 16:00
  • 1
    \$\begingroup\$ @you I think it's OK here: A good guideline for whether to post here over StackOverflow is "Would a game developer give a better answer than another developer?" Using Eclipse to develop and test Android apps is common, but rendering performance is considerably more important in games than general app development. \$\endgroup\$
    – Anko
    Oct 9, 2013 at 21:35

2 Answers 2

1
\$\begingroup\$

The debugger has to attach to the process, and it is what is causing your device to run more slowly than normal

It doesn't matter if you "debug" the app or not -- if it is set in the device, eclipse will debug

\$\endgroup\$
0
\$\begingroup\$

Debugging the app is expected to slow the device down.

The reason why you are slowing down even while not debugging is probably related to excessive logging.

\$\endgroup\$
2
  • \$\begingroup\$ I'm actually not logging anything though. I know debugging an app can make it slower, but I didn't expect if I just ran the app while connected via USB would have (nearly) the same slowdown. So I guess there's no solution other than to unplug my device when I need to test stuff on it? \$\endgroup\$ Oct 9, 2013 at 13:41
  • \$\begingroup\$ Well, wait and see if there are any other solutions. I'm surprised that this is happening, maybe some apps on your device are programmed to do something when they see that the device is being charged? \$\endgroup\$
    – you786
    Oct 9, 2013 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .