Eric's inappropriate manner notwithstanding, I'll weigh in with him and Leigh to say that, yes, there can be a genuine and substantial slowdown when running under the debugger.
I am using Eclipse Classic 3.6.2 with the latest ADK (downloaded two days ago via the standard mechanisms). For hardware, I have the latest model MacBook Pro with an SSD and 8 GB RAM running on mains power all the time and a fully upgraded (2.2) HTC Legend. I bought the Legend because the emulator was completely unusable for developing a port of one of my iOS OpenGL games (which runs at close to 60 FPS on my iPhone 4). Now, the Legend is no speed-demon. It currently runs at around 10 FPS without the debugger (obviously I have my work cut out for me), but running under the debugger drops the frame-rate to around 4 FPS. This happens even when I hook an already-running process via DDMS (within Eclipse). The difference is consistent and very noticeable. In case it's of any relevance, the main render loop doesn't create objects — it is pretty much pure OpenGL — so the GC running in some kind of debug mode probably isn't a factor. It is understandably difficult to help with this kind of problem if you aren't witnessing the problem yourself. I might see if I can strip out my IP and provide a simplified demo that exhibits the problem. But I suspect, seeing the feedback given here so far, that it's environmental, not code-related. So if anyone can suggest what factors might contribute, I'm happy to investigate from my end. Right now, however, I don't even know where to start. As an aside, I am curious about @String's comment to the effect that I should expect things to be slower in the debugger. I don't know that much about Java development, but native debuggers run code pretty much as normal, with minimal intrusion until a breakpoint is set, at which point they simply inject some kind of trap instruction (generally an interrupt opcode) at the relevant point in the code. Moreover, even though you normally run debug builds under the debugger, it is still perfectly OK — and quite common — to run optimised builds under the debugger; breakpoints and data inspection are a bit messier, but other than that, it just works, with no perceptible performance hit. Is the situation markedly different with Java and/or Dalvik? One final note: I just ran ddms stand-alone and turned on method profiling. It had the same effect as running the debugger. Could it be that the debugger automatically turns on method profiling in some environments and not others? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

