cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynaldo Porras García <>
Subject Re: poi hssf-serializer built in limitation
Date Fri, 06 Jun 2008 21:27:53 GMT
Hi Marc,

I got hit by this issue. I found the answer to your questions in the 
following thread:

I did my own tests in a recent cocoon revision 2.1.12-dev (r662435) 
running on 64M of Memory and I found if a StyleRegion is around 2^22 
cells it throws out an OOME. Hence it looks that the limit makes sense.

Here is the sample region I tested:

<gmr:StyleRegion startCol="0" startRow="0" endCol="255" endRow="16383">

On the other side the current limit of 2,000 cells is quite low. I think 
we can change it to a higher value up to 2^21 to stay safe in a 64MB 
environment. But the problem is that it generates a huge XLS document of 
20MB. Another problem I found switching to 2^21 is that I cannot 
generated the same document a 2nd time.

Perhaps switching from 2K to 2^16 as suggested by Matt Savino in his 
mail makes sense. Quoting:

"I changed the MAX_AREA constant to 65536 so that it could handle one entire
column. I saved the Excel file using both MAX_AREAs and at least for my app
there was no appreciable difference in file size (765k v. 766k)."


Best Regards,

Reynaldo Porras 

Marc Portier escribió:
> Hi there,
> I've ran accross a hard-coded limit in our ms-excel-format serizalizer
> (and it looks like I'm the second one :-)
> )
> $ find -name |xargs cat -n |head -65|tail
> $ find -name |xargs cat -n |head -102|tail -16
> It causes style-formatting-regions to be ignored if they span more then
> 2000 cells.
> Apart from the (to me quite dense) remarks in the code there is little
> to be found about what are the actual motives for this, or how we could
> assess if the limitations still stand in todays world or not.
> In fact, in terms of code-evolution I could only find this limit
> appeared to be in the original commit already.
> Does anybody remember anything about this?
> Does anybody have an idea about verifying if the limitation could be
> removed?
> kind regards,
> -marc=

View raw message