separate printwriter calls versus constructed stringbuffer
posted 12 years ago
Yes, when dealing with I/O (input/output) calls, fewer calls with larger chunks is generally going to perform better. For this very reason there are buffered I/O classes in java.io like BufferedWriter. It takes care of buffering your small chunks into larger ones, calling the underlying stream only when it has a large chunk ready (or when you call flush() of course).