Exploring Data Loading

Objective

After completing this lesson, you will be able to explain how data loading can impact on performance.

Data Loading Overview

In this lesson, we will explore data loading using two scenarios. The first scenario covers the basic requests that can be found in the Loading Sequence tab of the Performance Insights tool. In the second scenario, we execute a story with multiple data sources and widgets and analyze their performance in the Performance Insights tool.

Basic Requests

We start with a simple scenario, a story with just one chart widget. We analyze its performance using the Performance Insights tool and explore the various processes that take place during data loading.

Multiple Data Sources

When we add more charts to a story, the number of query requests increases. However, it's important to understand how that increase differs based on the data source types that are used.

In this video, we look at an SAP Business Warehouse model and the logic for the metadata calls, query requests, and render requests that are made to the backend when we copy an existing chart in the story. We look at query batching using two charts and an SAP HANA live model, as well as what happens when we use the SAP HANA live model for charts on two separate tab strips.

Summary

An increased number of data-bound widgets creates more backend requests, which, if not managed properly, can easily cause decreased story performance and a high load in the backend systems. This unit focuses on data loading settings at both the story and widget level, as well as other functionality that can improve data loading in your SAP Analytics Cloud stories.

Story Loading

Definitions

A viewable widget is a widget that is inside the screen viewport and the widget itself and all its parent containers are visible.

A widget that is inside an unopened popup is not a viewable widget.

Which widgets support viewpoint loading?

  • Chart
  • Table
  • Geo map
  • Input control
  • Text box with dynamic text

Which widgets do not support background loading?

  • A chart with a cross-widget feature enabled (e.g. scale alignment, referenced by dynamic text).
  • A text widget with dynamic text that is bound to a model dimension.
  • A story level input control on a mobile device.
  • A container widget containing a widget in it that does not support background loading.

General Flow

After the story definition is received from the SAP Analytics Cloud server, the browser analyzes the story definition to determine:

  1. which data-bound widgets need to be rendered, and
  2. for which of those data-bound widgets a data request needs to be triggered to the source systems to receive the data to visualize.

First check: Is it the right time to render the data-bound widget? This depends on the Loading Optimization Setting that was selected at the story level.

Loading Optimization Settings for a story: Viewport Loading, Background Loading, and None.

This setting is defined on story level and can't be influenced via script.

Second check: For data-bound widgets that are rendered, does data need to be fetched from the data source? This depends on the Data Refresh setting that was selected at the widget level.

Chart Properties Data Refresh settings for a widget: Always Refresh, Refresh Active Widgets Only, and Always Pause.

If the data is not requested, then the widget will be rendered as 'ghost image'; otherwise, it is rendered with the fetched data from the source.

The data refresh option can be dynamically set to any of the three states and changed as often as required using the script API datasource.setRefreshPaused(paused: PauseMode | boolean).

From a performance optimization perspective, the widgets that are rendered with data requested have the highest potential to save runtime.

Log in to track your progress & complete quizzes