mirror of https://github.com/apache/poi.git
Update the FormulaEvaluator performance section to match current behaviour
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1348657 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a69bdc08ba
commit
e06949f47d
|
@ -276,9 +276,22 @@ for(int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) {
|
|||
<section><title>Performance Notes</title>
|
||||
<ul>
|
||||
<li>Generally you should have to create only one FormulaEvaluator
|
||||
instance per sheet, but there really is no overhead in creating
|
||||
multiple FormulaEvaluators per sheet other than that of the
|
||||
FormulaEvaluator object creation.
|
||||
instance per Workbook. The FormulaEvaluator will cache
|
||||
evaluations of dependent cells, so if you have multiple
|
||||
formulas all depending on a cell then subsequent evaluations
|
||||
will be faster.
|
||||
</li>
|
||||
<li>You should normally perform all of your updates to cells,
|
||||
before triggering the evaluation, rather than doing one
|
||||
cell at a time. By waiting until all the updates/sets are
|
||||
performed, you'll be able to take best advantage of the caching
|
||||
for complex formulas.
|
||||
</li>
|
||||
<li>If you do end up making changes to cells part way through
|
||||
evaluation, you should call <em>notifySetFormula</em> or
|
||||
<em>notifyUpdateCell</em> to trigger suitable cache clearance.
|
||||
Alternately, you could instantiate a new FormulaEvaluator,
|
||||
which will start with empty caches.
|
||||
</li>
|
||||
<li>Also note that FormulaEvaluator maintains a reference to
|
||||
the sheet and workbook, so ensure that the evaluator instance
|
||||
|
|
Loading…
Reference in New Issue