Skip to Content
Technical Articles
Author's profile photo Dhyaneshwaran KS

Redistribute Dashboard rending time via Pause Data Refresh in SAC Analytic application – Explained

Hello All,

In this blog, we would touch upon one of the simplest ways to manage / distribute the rendering time of a complex dashboard having a high number of widgets in its canvas

The Plot:

As an SAC analytics application designer, many a times, I have come across complex dashboarding requirement necessitating large number of objects in the canvas container.

In this case, each visual element (Table, chart etc.) = New data source (even if they share the same model)

For example,  if I have 2 tables and 2 charts deriving data from same SAC model then I have 4 data source and not one and each refresh individually. This is because the data binding architecture is driven based on the visual element / widget rather than the data source (which is quite opposite to what we had in SAP Lumira Designer)

Nevertheless SAC provides us an opportunity to handle the timing of refresh of these duplicate data sources so that we can still present a performant dashboard.

The workable solution:

In such a scenario the first and foremost objective is to recognize and flag the widgets / components that show up in the landing page. Then, you can pause the refresh of  other charts/ tables which are not visible initially at run time. I find this approach more performant than loading widgets in background.

So, pause the refresh for applicable widgets until

  1. Application users have completed pre-requisite actions
  2. Or necessary initialization activities are done.

So you are basically dictating which widgets should refresh on initial load or when a click event is performed instead of running all of them in background. Once you trigger the pause refresh of a chart or table, no data refresh will take place till intervened by an applicable scripting on an onselect() activity.

The Technicality:

  1. Navigate to the builder section of the desired chart or table for which you want to pause refresh.
  2. Enable Pause Data Refresh
  3. Disable Pause Data Refresh through Script

  Pause%20Data%20Refresh%20Option%20-%20Builder%20Screen

Pause Data Refresh Option – Builder Screen

Sample code to enable refresh: Table.getDataSource().setRefreshPaused(false);

Sample code to disable refresh: Table.getDataSource().setRefreshPaused(true);

The Outcome:

This can improve the efficiency of retrieving and updating a table or chart when running an application. Hope you find this insight useful to manage complex dashboards and manage /distribute the refresh time of widgets.

 

Regards,

Dhyanesh

 

Assigned tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Aleksey Salinin
      Aleksey Salinin

      Dhyaneshwaran KS thanks for the post!

      There are two questions:

      1. Application.setRefreshPaused([ds1,ds2,...dsn) - does it work the same way? Сan I access an array of data sources and not widgets?
      2. SetRefreshPaused() method doesn't load data sources on initialization? Even if they are with input variables?

       

       

      Author's profile photo Vikash Agrawal
      Vikash Agrawal

      Thanks for the post Dyanesh. it shall be worth considering in complex dashboards.