When printing very long lines without line breaks, DrJava slows down and becomes unresponsive. It basically hangs. This isn't the case when the same amount of information is printed, but with line breaks inserted.
This program is bad:
public class FloodDrJava {
public static void main(String[] args) {
for(int i=0; i<10000; ++i) {
System.out.print("Hello "+i+" ");
}
}
}
This program is not so bad:
public class FloodDrJava {
public static void main(String[] args) {
for(int i=0; i<10000; ++i) {
System.out.println("Hello "+i+" ");
}
}
}
It seems like it's appending to long lines that's killing the performance.
Hello,
I ran the programs listed above. I agree that while both programs can take a while to run, the one with no line breaks slows down significantly towards the end. I compared this to running the same programs in NetBeans (another Java IDE) and noticed that NetBeans stops the program without linebreaks because the line is too long. Since having single lines with thousands of characters is a bit impractical, perhaps a similar functionality in DrJava would be useful.