This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
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: 86
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: 86
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: 12756
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Very poor performance while debugging (with breakpoints)
 
Similar Threads
WSAD - Debug with external source.
tomcat under eclipse: breakpoints that don't
eclipse debug - breakpoints are skipped
help debugging Weblogic from Eclipse
Debug in weblogic