Optimize writing to StreamWriter#1681
Conversation
fix files encoding fix current culture in TestCellFormat tests
|
Since this is a performance optimzation PR, let's go further. Direct Write (Fastest): Using streamWriter.Write(string) sends text directly to the internal buffer, requiring minimal CPU overhead. How about getting rid of the formatted write so that it can be faster? For example
To
|
|
In #1095, it has some similar optimization
To
And
To
Please run the following beachmarks to see if there is real optimization as #1095 did. NPOI.Benchmarks.LargeExcelFileBenchmark |
|
@lahma Do you have any further suggestion? |
|
agree with removing the format altogether, should be easy regex or AI work, also instead of |
writing the formatted string directly to the StreamWriter, using an existing method that has the same semantics as string.Format
fix .cs files encoding to UTF-8 with BOM
fix used culture in TestCellFormat tests