https://issues.apache.org/bugzilla/show_bug.cgi?id=45570
Summary: Reduce memory overhead of BitField references
Product: POI
Version: unspecified
Platform: PC
OS/Version: Windows Vista
Status: NEW
Severity: enhancement
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=22391)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22391)
proposed patch
I had a 20MB Excel workbook (doesn't sound very big to me...) which took up
around 600MB RAM in HSSF.
Attached patch reduces this to around 500MB for this particular workbook by not
holding references to BitField instances from instances which occur a large
number of times (I used jhat/jmap and found all the BitField objects with a
large number of references from the same type of object.)
There are further BitField references which I did *not* change to static; this
is only the ones I noticed for one particular file. In some cases making
things static can be a bad idea as it increases the memory usage even when
there is no workbook in memory.
Incidentally, the major memory hog is actually the formula Ptg arrays (they're
taking up 150MB!) but I couldn't figure out a good way to trim them down. How
could these structures possibly take up 25 times the size of the original file?
Can't the parsing of formulas be done on demand instead of storing all the
structures in memory?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]