Bug 48205

Summary: POI 3.5 Memory and perfomance solution
Product: POI Reporter: Jaydeep <nisharg>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: adithya.neelavara
Priority: P2    
Version: 3.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Approch document, to give more infomation about solution.

Description Jaydeep 2009-11-16 04:05:08 UTC
Hi,

As directed by David, posting as a bug entry.

This project does not contain Unit test cases, but I have created a small stand-alone program. If needed unit test cases can be created, but that depends upon my availability.

Forum Entry can be found at :
http://old.nabble.com/POI-3.5-Memory-and-perfomance-solution-td26313991.html

For Reference:
--------------
This is continuation of thread at below location:
http://old.nabble.com/Memory-and-perfomance-issues-td25990601.html

We have extended Yegor's BiggridDemo and provided some more features. I have attached approach document for attached eclipse project. This project also contains ready to run program (ExcelDemo.java).

This solution does not cover 100% of Excel features but targets most of the sweet spots.

We would like to know how best we can utilize this code in POI.

Note: ooxml-schemas-1.0.jar, xmlbean-2.3.0.jar and poi-3.5-beta7-20090602.jar files are not included in eclipse project due to file size limitation. Please provide the files in classpath.DemoProject.zip
Comment 1 Jaydeep 2009-11-16 04:14:15 UTC
Hi,

Because of the size limitation DemoProject.zip can not be attached here. Please download it from forum entry.

Jaydeep.
Comment 2 Jaydeep 2009-11-17 01:05:37 UTC
Created attachment 24548 [details]
Approch document, to give more infomation about solution.
Comment 3 Petr.Udalau 2009-11-23 02:54:25 UTC
As I understood main idea is to use common classes(Cell, Sheet, Workbook) for HSSF and XSSF and use Mappers(or Writers) to save workbook into needed format.
It will be suitable because parsing and saving HSSFWorkbook and XSSFWorkbook takes different memory and process resources.

In addition it will good for evaluation. 
I created simle test with sheet that contains big number of formulas and run it with profiler. Test contains parsing of workbook and evaluaion of all formulas two times.

Results:

Step                     HSSF     XSSF

Parsing:               10735ms   19859ms
The First Evaluation:   5046ms   18234ms
The Second Evaluation:   485ms     922ms

Methods of formula parsing(during the First Evaluation) and getting type of cell(during the Second Evaluation) takes most of time.
Comment 4 Nick Burch 2010-08-25 07:01:42 UTC
Please do not randomly change priorities without offering useful input

If this bug is critical to you, please submit patches that improve things, or get a budget to sponsor someone to code the patches
Comment 5 Yegor Kozlov 2011-06-16 15:32:03 UTC
Since 3.8-beta3, POI provides a low-memory footprint SXSSF API built on top of XSSF.

See
http://poi.apache.org/spreadsheet/index.html
and
http://poi.apache.org/spreadsheet/how-to.html#sxssf


Yegor