calculations still called often

after upgrading our servoy developer to 2.1, we (happily)
noticed that calculations were not called as often as in
previous releases :o

the problem is, a few of our calculations are time consuming,
as they call many other calculations in order to generate a
“grand total”.
this is the needed functionality, and calulations seem well suited
for the task.

however, i’m finding that calcs are still called many more times
than i would expect them to be. as an experiment, i put together
a very small solution with only one field, and one calculation.
both the field and calc are on a form. the calc calls
application.output so i can see when it’s getting called, and
returns the value of the one field multiplied by 2.

when i bring up the form, and enter a value in the field, then
click outside the field, the calc is called 3 times!

i’m also finding that in my main solution, which has 12 tabs on a
tab sheet, switching between tabs causes our calcs to fire many
times, even though no data has been changed.

we’d really like to speed up the performance of the solution,
without redesigning the whole thing. is there a way to get
servoy to cut back on the number of times it calls calcs?

We noticed exactly the same thing the other day - every calculation was called three times onRecordSelection…

glad to hear it’s not just us!

it’s really causing us a problem, since page totals are based
on item totals, and grand totals are based on page totals, and…

you get the idea.

this will be looked at in a further release (will be improved in 2.5)
I can’t do this for a minor release (2.1.X) because changing this will result in to many changes that really needs to be checked.