do as deferred
Hi Fred, Isaw that.
For those looking for solutions. If you work with Dashboards on the Main screen you can apply something like "Calculate my Stats but do it in the background" and then refer only to the calculated value to immensly speed up your system.
What I did was to
* Add "Stats-Fields" to each employee.
* When opening the database OR when opening the tab of the Dashboard i use the trigger "do as deferred .... let me:=employee(); let me.mystat1:=select x where y=z ... end".
Which then calculates everything on server side without loading the actual selected values to the browser and calculating it there. This means, that my stats sometimes are "a bit off and then correct themselves" but based on the use case this is totally fine for me.
I try to implement, but no way, you have some very simple DB for that.
3 replies
-
Hi I wanted to check you are using do as deferred as it is intended to be used. Have a look at this Optimize performance of scripts
You can see, do as deferred is used when you want to split a script into more than one thread so they can both be executed separately. There's a neat example of it being used in a trigger where a setting is made and also an email is sent. To allow the operator to be able to continue working more quickly, the send email is wrapped in a do as deferred
Regards John
-
The solution of using do as deferred was not mine.
Content aside
- 1 mth agoLast active
- 3Replies
- 46Views
-
3
Following