Wonder why your Java IO is slow?
Saturday, January 20, 2007
During one of my debugging sessions, I came across the following piece of code inside the java.io.PrintStream class from jdk 5.
No wonder java IO is so slow!
protected void setError() {
trouble = true;
try { throw new IOException();} catch (IOException x) {}
}
No wonder java IO is so slow!
Labels: bloopers, java, VirtualAnt
2 Comments:
commented by willCode4Beer, 7:53 AM, January 23, 2007
That has gone in Java 6.
commented by 8:01 PM, January 23, 2007
,
wow!!!
I had to open the source just to look. At least its only in the setError method so, its not being called in a loop.