Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  free3dom Oct 8 '13 at 21:28
    
I think this should be on StackOverflow rather than here since it really has nothing to do with gamedev. –  you786 Oct 9 '13 at 16:00
1  
@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. –  Anko Oct 9 '13 at 21:35
add comment

2 Answers

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

share|improve this answer
add comment

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.

share|improve this answer
    
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? –  Ralph23 Oct 9 '13 at 13:41
    
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? –  you786 Oct 9 '13 at 15:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.