we do that since the beginning. i guess to be sure that the record is a a fully consistent state, but we could loosen that if it would be a real problem.
I think it would be right only to trigger the storedCalcs. If there are dependencies the storedCalcs should execute the necessary calcs themselves.
And the use of calcs (not stored calcs) to edit a value in the database seems to be the wrong concept. I think then it would be an on(after)RecordUpdate / on(after)RecordInsert event and not a calc.
For my function it would save many hours of execution time if only stored calcs are executed!
So it would be nice to change that.
Regards, Stef
After everything is working I found out that the function is getting slower to the end! It is not just a little bit. In the beginning it need per record about 0.2 seconds. In the End it need 5 seconds per record for an table with 13000 Records. Is there some issue for that or planned to look into this?
Regards, Stefan
dont you run out of memory or something like that?
you could show the about dialog to see how the memory grows.
But why i am running out of memory if i save aber every record databaseManager.saveData(currentRecord). The Memory is then no more needed.
- How do the memory allocation work in servoy?
- Is the problem the big foundset?
Regards, Stef
did you check if that was the case?
You are in a very tight loop looping through many records. So you yes you generate quite a lot of garbage or use in a very short time quite a lot of memory…
Also where does the cpu time go? Maybe it is even the database?
the database is not the problem i think the client allocates about 900 mb and the db only 240. The cpu of the db is beetween 1 and 5 percent. The cpu for the client it almost the hole time at 90 precent or more.