I’m analysing the performance of a solution and figure out that a simple calculation takes an total execution time of 5 seconds (!) while showing a form.
The calculation “cal_result_x” is on the table “order” and looks like
My question is why does Servoy execute the calculation 10 times on showing the form and not only one time?
Because of the relation in the calculation the average execution time is 500 ms. I think this is high enough but 10 times of 500 ms is 5 seconds!
I have replaced the calculation by a method. The execution of the function takes 200 ms and will be executed only one time. This is really a significant advantage!
then i have no idea why that is triggered 10 times for you, it should only do it once,
Somehow it does find that the input is constantly changing and is i guess flagging the calc to be executed again
(if it really calculates for the same record and not for 10 different records)
Maybe you should try to create a case with that as a sample
thats just our special combined query to get also the data for the sibling records so that the next time if you would go to the next record nothing has to be get from the database anymore, we do max 10 at once
So that doesn’t mean that the calculation is executed 10 times, if you add an application output to the calc itself, is it really executed 10 times for exactly the same record (if you print the pk of that record)