Here's a link to my example:
https://www2.dropbox.com/sh/fqxqwip68qsvdy7/UXF9Kn_rSQ/poi_slow_copy_example.zip

Just create a lib folder with POI 3.8 dependencies.

I've created an empty xls with some of the formula I have in my template, and 
replicate the row 1000times.

If you run RowCopy.bat, you will see that it starts fast, and progressively 
slows down to a crawl.

Thanks for helping.

Raffaele

On 27/02/2012 13:24, Yegor Kozlov wrote:
Can you narrow it down to a isolated unit test so that we can debug
the problem on our side?

without a test file we can't do much.

Yegor

On Mon, Feb 27, 2012 at 4:10 PM, Raffaele Castagno
<[email protected]>  wrote:
>  On 27/02/2012 11:06, Yegor Kozlov wrote:
>>
>>  Calling setCellType is extra in both cases. Cell.setCellFormula
>>  automatically changes the cell type to CELL_TYPE_FORMULA and
>>  setCellValue to the appropriate time.
>>
>>  Is POI slow with replacing any formulas or only when setting your
>>  special ones: you mentioned that your formulas are complex and it
>>  might be the case.
>>
>>  You can estimate parsing time by calling the formula parser explicitly:
>>
>>           Ptg[] ptgs = HSSFFormulaParser.parse(formula, workbook);
>>
>>  Are you sure it is the bottleneck?
>>
>
>  Tried some variations, been unable to test explicit formula parsing, but the
>  "setCellFormula()" seems to be the bottleneck.
>
>  If I remove some of the formula from my template, speed improves, but anyway
>  speed degrades as it processes more rows,
>  so the problem is not in the complexity of the formulas, but it's something
>  related in general to formula processing.
>
>  I'm running out of ideas...
>
>
>  Raffaele C.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected]
>  For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to