performance - How to gauge Excel Calculation speed? -


i developing excel 2010 application, contains complex calculations in on 60+ worksheets. when change data in cell, takes lot of time in background calculation (i want calculation automatic).....

  1. is there way find out formula taking more time on other?
  2. what better approach improve performance - multiple simple formulas vs. single complex (multistep) formula?

i.e.
[step-1] e1 = c1 * d1
[step-2] f1 = e1 / b1
[step-3] g1 = f1 + b1

or

[single step] g1 = (c1 * d1 / b1) + a1

suggestion appreciated!
thanks

as second part, if use ordinary non-volatile functions multiple simple formulas better 2 reasons:

  1. on simple recalculations (without rebuilding dependency trees) excel calculate parts changed, e.g. in single step example if value in a1 changes excel have recalculate expression in parentheses (c1 * d1 / b1) if values of c1, d1, b1 unchanged. when replace part reference f1, value of f1 not recalculated if a1 changes value.
  2. multiple simple formulas better calculated in parallel if have multiple cores.

another usefull link in addition msdn: http://www.decisionmodels.com/calcsecretsc.htm

volatile functions evil in large workbooks, offset , indirect. recalculated every time changes in file, , calculated in single thread. cell depends on cell volatile function becomes volatile well, because dependencies have recalculated every time volatile function recalculated. viral volatility in big file damage performance. using many simple formulas helps in case well, since many dependencies remain non-volatile.

from link above:

some excel features not use multithreaded calculation, example:

data table calculation (but structured references tables use mtc). user-defined functions (but xll functions can multithread-enabled). xlm functions. indirect, cell functions use either format2 or address options. getpivotdata , other functions referring pivottables or cubes. range.calculate , range.calculaterowmajororder. cells in circular reference loops.

once upon time inherited big file took 30 min recalculate on dedicated fast machine , due crazy usage of offsets access data big sheet. moving calculation logic excel access , importing results via pivot table reduced total calculation time several seconds!


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -