Data references are executed on demand. So for the Formula data reference configured on an attribute, it provides a list of its input attributes used in the calculation and reads the values in bulk. It will then evaluate the calculation and return the result.
So if a parent attribute with a formula is referencing a child attribute with a formula, then calling GetValue on the parent attribute will first obtain its inputs which will cause the child attribute's formula to be evaluated. Then the parent's formula will be evaluated. As you can see, this can easily cascade into many inputs being read and evaluated when reading an attribute's value which references many nested attributes with formulas. The new Analytics just released in AF 2.6 is a better solution for this type of configuration.
Data references are executed on deman. To executed calculations by exception or periodically I have to use Event Frame.