ASF Bugzilla – Full Text Bug Listing

- Home
- | New
- | Browse
- | Search
- | [?]
- | Reports
- | Help
- | New Account
- | Log In
- | Forgot Password

Summary: | HSSFFormulaEvaluator#evaluate functions need to cache intermediate cell values | ||
---|---|---|---|

Product: | POI | Reporter: | Nick Burch <apache> |

Component: | HSSF | Assignee: | POI Developers List <dev> |

Status: | RESOLVED FIXED | ||

Severity: | normal | CC: | |

Priority: | P2 | ||

Version: | 3.0-dev | ||

Target Milestone: | --- | ||

Hardware: | PC | ||

OS: | Windows XP |

Description
Nick Burch
2008-07-10 15:00:15 UTC
Are you sure that your formulas aren't recursive? That would explain the timings we're seeing on evaluating them (I can't actually figure out what your formula does, clearly I don't know enough about what can be done with excel formulas....) There's a test in src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java for anyone who's interested The formula is indeed a recursive one, but the time needed to evaluate it, especially for column 9 to 15, is not acceptable, I think (compared to the time excel needs to evaluate it, which is almost null). When you have a look at the sheet, you can see that the formula is also set for columns with index greater than 15. The time to evaluate these formulas would of course grow exponentially. What the formula does, can be expressed in the following way: - get the date (year and month) of your left neighbour cell and add "1" to the month. - look, if that date is smaller or equal to the date in column (3,4). - if so, put it the new date into the actual cell - else, write down #nv It is clear, that the recursive formula evaluation is executed twice for each cell, but compared to the low complexicity of the formula, that should not result in such a long running evaluation. In my case, it's also recursive formulas. |