Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Very poor performance while debugging (with breakpoints)

 
David Balažic
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic