Hi,
A bit surprised by the inefficiency of some elements in XSSF.
Take for example XSSFCellBorder.equals method:
public boolean equals(Object o) {
if (!(o instanceof XSSFCellBorder)) return false;
XSSFCellBorder cf = (XSSFCellBorder) o;
return border.toString().equals(cf.getCTBorder().toString());
}
I created an .xlsx file with 12000+ cells, with borders. This means the library
calls StylesTable.putBorder some 96000 times (12000 * 4 * 2, 12000 cells, 4
borders, and 2 calls per border style + color)
putBorder calls "indexOf" on the borders list, and so indexOf calls
XSSFCellBorder.equals for every element in the borders list.
The equals method tests 2 strings constructed from complex XML objects.
Writing the file takes 3 minutes !
With SmartXLS it takes less than 3 seconds.
Do you think this behavior could be modified somehow ?
Regards
FD
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]