| Author |
Very poor performance while debugging (with breakpoints)
|
David Balažic
Ranch Hand
Joined: May 15, 2008
Posts: 83
|
|
Hi!
I work on a Java project using Eclipse.
I noticed that sometimes when running the code in debug mode, it executes very slow (10 or more times slower than normal).
I googled and only found, that disabling breakpoints help.
That is true. If I temporarily disable all breakpoints, the code runs at normal speed (still a bit slower than in non-debug mode, but that is OK).
The thing is, this happens only sometimes. But I can't figure out what triggers the "slow mode".
I use Eclipse 3.5.1 (galileo SR1) with Sun JRE build 1.6.0_17-b04 on Windows XP SP3.
Any idea?
Regards,
David
|
 |
David Balažic
Ranch Hand
Joined: May 15, 2008
Posts: 83
|
|
Actually it is much more slower than 10x. What normally runs in 10 seconds is now running for 5 minutes and is still not even half done.
It is impossible to work like this. I beg for any solutions ;-)
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
The obvious answer is to design your code to facilitate debugging without the full bore debugger.
Personally I code in lots of System.out.println() to help confidence that things are going as expected. Other folks swear by Unit testing concepts and/or aspect oriented programming.
Eclipse supports AspectJ and JUnit.
It is a big help, especially with web applications, if your code can be broken into modules which can be tested separately.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Very poor performance while debugging (with breakpoints)
|
|
|