Performance Suggestion | Rest API Integrate | Issue | Outsystems

Performance Suggestion | Rest API Integrate | Issue | Outsystems

  

Hi,

I am calling REST API Custom Actions on Screen in onReady Action.

Thus under onReady Action I usually use below :

- Calling the API Action

- Refresh Aggregate

- Delete Local Entity


Because of this I had almost 15 performance suggestion with below message:

'OnReady' contains accesses to the local storage or server, which delays the screen's render. To avoid performance issues, use Aggregates or Data Actions instead.


Any Suggestion to resolve this,

Kindly

Hi Assif,


If you want some data in Mobile App OnReady, its not recommended to use directly aggregates/APIs in those methods as it will show you warnings and will impact performance. 


You should not even use OnRender, because OnRender actions are triggered whenever there is a change in variable. So its not one time load function.


If you want to use data on your page ready, right click on your screen/block and select any of the following:


Then you can just use their in built method, OnAfterFetch like below:

So no need to use OnReady as it will first load the data and then display the page elements.

By using this way, it will never show you the performance warnings and will not impact performance.

Let me know if you want some more information on this.

Regards,
Palak Patel

For more information about how performance and rendering of data is managed in Mobile Apps using various methods, refer to the following link:
Screen and Block LifeCycle Document

It will surely help and clear your all doubts.


Regards,
Palak