I realize that Java code will slow down when run in debugger.
Question is, will the code slow down simply by starting Java with these options:
Xdebug
Performance testing results at AMD indicate that simply enabling the debug agent via the JVM commandline does cause performance degradation regardless of having a debugger connected to it, and that the degradation can be quite large depending on the workload:
Note that we weren’t actually attaching a debugger when we were measuring performance, so we had assumed this agentlib option would be performance-neutral in this usage scenario. When we removed this option, both the CPU utilization and the performance on this workload (measured in requests handled per second) improved dramatically.
See their report:
http://developer.amd.com/resources/documentation-articles/articles-whitepapers/java-performance-when-debugging-is-enabled/
Above link is dead, here's a web archive link of it: https://web.archive.org/web/20160316201129/http://developer.amd.com/resources/documentation-articles/articles-whitepapers/java-performance-when-debugging-is-enabled/