This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Performance and the fly likes Very poor performance while debugging (with breakpoints) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Very poor performance while debugging (with breakpoints)" Watch "Very poor performance while debugging (with breakpoints)" New topic
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
    
    1
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Very poor performance while debugging (with breakpoints)
 
Similar Threads
Debug in weblogic
help debugging Weblogic from Eclipse
WSAD - Debug with external source.
tomcat under eclipse: breakpoints that don't
eclipse debug - breakpoints are skipped