https://issues.apache.org/bugzilla/show_bug.cgi?id=55280
Bug ID: 55280
Summary: Poor (Blocking) Performance of Merged Regions
Product: POI
Version: 3.9
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
The problem can be reproduced by the following test case:
Workbook w = new XSSFWorkbook();
Sheet s = w.createSheet();
for (int row = 0; row < 5000; ++row)
s.addMergedRegion(new CellRangeAddress(row, row, 0, 3));
s.shiftRows(0, 4999, 1); // takes 15 minutes
shiftRows() takes 15 minutes because it shifts all merged regions, which is
done be removing and re-adding merged regions one by one. Especially the
implicit calls to Sheet.removeMergedRegion(idx) are slow.
Thus working with a lot of merged regions is limited because a (maybe implicit)
shift of the merged regions will block the application.
An approach to solve the problem may be to implement (and use internally) a
method which removes multiple merged regions at once, e.g.
Sheet.removeMergedRegions(int[] ids)
This can be implemented much more efficient than calling removeMergedRegion(id)
for each single id.
Regards
Olaf
--
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]