Redistribute Dashboard rending time via Pause Data Refresh in SAC Analytic application – Explained
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
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
- Application users have completed pre-requisite actions
- 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.
- Navigate to the builder section of the desired chart or table for which you want to pause refresh.
- Enable Pause Data Refresh
- Disable Pause Data Refresh through Script
Sample code to enable refresh: Table.getDataSource().setRefreshPaused(false);
Sample code to disable refresh: Table.getDataSource().setRefreshPaused(true);
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.