Bug 63443 - Writing a large spreadsheet 4x slower after upgrading to 4.0+
Summary: Writing a large spreadsheet 4x slower after upgrading to 4.0+
Status: RESOLVED LATER
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.0.0-FINAL
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-16 09:17 UTC by Thomas van Putten
Modified: 2019-06-05 17:13 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas van Putten 2019-05-16 09:17:18 UTC
Whilst upgrading from 3.17 to 4.1.0 we experienced a severe reduction in the performance of writing a larger spreadsheet we have in our application.

3.17 took ~4 seconds
4.1.0 took 17-20 seconds (same for 4.0.0 and 4.0.1)


After doing some digging it turned out XSSFRow.java onDocumentWrite method started using a lot more CPU time now.


This eventually led to us looking at this patch r1825277
It looks like this performance optimisation was removed intentionally as part of bug #62130


Is there a way around this significant performance penalty? 
As it's likely to be deemed unacceptable for our users.
Comment 1 PJ Fanning 2019-05-16 13:28:14 UTC
The previous optimisation appeared to cause problems in some cases.

Feel free to submit a patch if you can get an implementation working that doesn't break the existing tests.

Another option is to use SXSSFWorkbook for writing your file as this implementation doesn't have the XMLBean overhead (at the cost of reduced capabilities).
Comment 2 Thomas van Putten 2019-06-05 17:13:29 UTC
Thank you for your explanation, we're unlikely to find time to submit a patch soon but now we at least know what's up.