You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/08/06 09:11:38 UTC

DO NOT REPLY [Bug 45570] Reduce memory overhead of BitField references

https://issues.apache.org/bugzilla/show_bug.cgi?id=45570


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-08-06 00:11:38 PST ---
Converted all instance BitFields to static. Applied in svn r683132

However, I suspect the problem with Ptg arrays is more important.
Every Ptg (subclass) instance consumes at least 12 bytes (on a 32 bit JVM) due
to the Ptg superclass.  Most Ptg subclasses have data fields which probably
also take extra space due to JVM word alignment.  I would estimate that the
parsed Ptg arrays consume about 3 times as much space as the encoded byte
arrays.  Such an expansion may not be so bad in itself.  It certainly wouldn't
account for the 25x expansion you have observed.

It should be noted that POI expands ShareFormula, MulBlank and MulRK records
upon reading.  Try writing the spreadsheet back out with POI.  Any growth is
usually due to these expansions.  You can run BiffView on both spreadsheets to
confirm the differences.  One of the things on the POI to-do list is to have
these expanded records re-compacted upon writing out.

Since SharedFormula records contain Ptg arrays, this might explain the massive
memory use you are observing.  Making POI *not* expand SharedFormula records
might be a complex change.


BTW - I think 20MB *is* a big spreadsheet (unless it contains mainly pictures).
I am closing this bug off for the moment.  If you are prepared to work on a
patch, please re-open and we can try to improve things further.


-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org