https://issues.apache.org/bugzilla/show_bug.cgi?id=53508
Priority: P2
Bug ID: 53508
Assignee: [email protected]
Summary: Performance XSSFCell.setCellValue(String) is very slow
Severity: normal
Classification: Unclassified
OS: Linux
Reporter: [email protected]
Hardware: PC
Status: NEW
Version: 3.8
Component: XSSF
Product: POI
We generate large Documents. We found that especially Sheets with String-Cells
are very slow.
CPU-Usage was several minutes 100%. Memory footprint rather low.
(24 Minutes for a Sheet with around 31000 rows)
I take a look in Source code and figured out, that XSSFCell uses shared Strings
Method.
I debugged a little trough and found that the generation of the HashKey for the
shared Strings seems to be very expensive. (SharedStringsTable.addEntry)
For me, I solved the problem by using Inline Strings instead of Shared Strings.
It is very much faster. (only some seconds now instead of 24 minutes)
But Api for this is not at top-level. I use this now:
CTCell ctCell = ((XSSFCell)cell).getCTCell();
ctCell.setT(STCellType.INLINE_STR);
XSSFRichTextString xssfRichTextString = new XSSFRichTextString(value);
ctCell.setIs(xssfRichTextString.getCTRst());
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]