Skip to main content
deleted 8 characters in body
Source Link
Neil
  • 22.8k
  • 47
  • 76

You might consider using BufferedFileWriterBufferedWriter, though that probably won't help significantly with performance, it's a best practice in any case, since I imagine the number of lines won't always be 60,000.

Have you considered zipping the file afterwards? If you intend on having a lot of these files laying around, might be in your best interest to zip it up after it's been written to, especially if you're going to be creating these files once every couple hours.

For what concerns memory, you probably have nothing to worry about unless you're working on a system with very little memory, in which case you should use BufferedFileWriterBufferedWriter and explicitly set the buffer size.

You might consider using BufferedFileWriter, though that probably won't help significantly with performance, it's a best practice in any case, since I imagine the number of lines won't always be 60,000.

Have you considered zipping the file afterwards? If you intend on having a lot of these files laying around, might be in your best interest to zip it up after it's been written to, especially if you're going to be creating these files once every couple hours.

For what concerns memory, you probably have nothing to worry about unless you're working on a system with very little memory, in which case you should use BufferedFileWriter and explicitly set the buffer size.

You might consider using BufferedWriter, though that probably won't help significantly with performance, it's a best practice in any case, since I imagine the number of lines won't always be 60,000.

Have you considered zipping the file afterwards? If you intend on having a lot of these files laying around, might be in your best interest to zip it up after it's been written to, especially if you're going to be creating these files once every couple hours.

For what concerns memory, you probably have nothing to worry about unless you're working on a system with very little memory, in which case you should use BufferedWriter and explicitly set the buffer size.

Source Link
Neil
  • 22.8k
  • 47
  • 76

You might consider using BufferedFileWriter, though that probably won't help significantly with performance, it's a best practice in any case, since I imagine the number of lines won't always be 60,000.

Have you considered zipping the file afterwards? If you intend on having a lot of these files laying around, might be in your best interest to zip it up after it's been written to, especially if you're going to be creating these files once every couple hours.

For what concerns memory, you probably have nothing to worry about unless you're working on a system with very little memory, in which case you should use BufferedFileWriter and explicitly set the buffer size.