Bug 61044 - setCompressTempFiles(true) must be called before createSheet()
Summary: setCompressTempFiles(true) must be called before createSheet()
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.15-FINAL
Hardware: Macintosh Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-26 06:46 UTC by Tim Jones
Modified: 2017-04-26 09:44 UTC (History)
0 users



Attachments
Documentation patch (tar.gz) (437 bytes, patch)
2017-04-26 07:22 UTC, Tim Jones
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Jones 2017-04-26 06:46:28 UTC
In order for the temporary files used by SXSSFWorkbook to be compressed, setTemporaryFiles(true) must be called before createSheet() is called.

If this behaviour is expected, I feel it should be documented.
Comment 1 Tim Jones 2017-04-26 07:22:46 UTC
Created attachment 34952 [details]
Documentation patch (tar.gz)

This patch adds the text:

"Setting this option only affects compression for subsequent <code>createSheet()</code> calls."

to the javadoc for setCompressTempFiles().
Comment 2 Nick Burch 2017-04-26 09:44:28 UTC
When you create the sheet, all the temporary files needed for it are created. That's why a call to compress won't affect already created sheets, as those have already setup their files and have them all open uncompressed

Patch committed in r1792720, thanks!