enketo-core
enketo-core copied to clipboard
change evaluation cascade order to speed up calculations
-
In calculate.js, the relevancy of the node with the calculation is determined to determine whether to evaluate the expression or to set to ''. This is very crude as it evaluates all ancestors' relevant expressions
-
Two steps further in the evaluation cascade, relevancy is updated. This update is smart, only updating expressions with a dependency on the nodes that have changed.
It seems very worthwhile to try to :
a. switch the relevant and calculation update in the evaluation cascade b. in calculate.js only look at the .disabled class of self and ancestors (best to use a function from relevant.js to avoid duplication). c. be careful with calcs that have no body presence c. do any tests fail?