ferronrsmith / jcsv

Automatically exported from code.google.com/p/jcsv
0 stars 0 forks source link

Cache "System.getProperty("line.separator")" result instead of reading it for every line #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When we profiled our application we noticed that a lot of time was spend in the 
"System.getProperty("line.separator")" call of the CSVWriterImpl.write(E e) 
method.

I attached a patch which modifies CSVWriterImpl to store the "line.separator" 
property in a private field. It would be nice if this patch is merged into a 
future release of jcsv. 

Thanks for providing this useful library. :=)

Original issue reported on code.google.com by pascalsc...@gmx.net on 27 Sep 2013 at 6:18

Attachments: