<-- Back

Performance issue with Data grid (Lazy Loading)

Issue

End users can face performance issues while working with DataGrid 1, DataGrid 2, ListView, and Template grids. A frequently raised issue is that while loading a page all the objects in the data widget are loaded instead of the required objects causing performance degradation.

Environment

  • DataGrid1, DataGrid 2, ListView, and Template grids (Data widgets)

Cause

The behavior depends on the type of data source: we distinguish between server-paged and client-paged data sources.
  • Database and XPath data sources are server-paged. That means that the client sends an offset and limit to the runtime and only those records are queried and returned. Filtering and sorting is similarly done by the runtime. For widgets with pagination, this means that only the current page is retrieved and every switch to a different page triggers a request to the runtime (but only for that page).

  • Microflow and Nanoflow data sources are client-paged. The objects returned by the flow are kept in memory in the client and the limit and offset within those results are applied by the client. Filtering and sorting are similarly done by the client. For widgets with pagination, this means that the data source is only fully reloaded (= running the flow again) if one of the input parameters changes (including entity updates), not when switching between pages or changing the filter or sort order.

  • The association data source is also client-paged, at least for pluggable widgets (including the built-in List view). Filtering and sorting on client-paged data sources is not supported for Dojo widgets like Data Grid 1 and Template Grid. There is some convenience built into Studio Pro to enable "server-side paging" for microflow data sources on Data Grid 1, which adds a special system parameter to the microflow to enable paging and sorting. However, this is currently not supported for Data Grid 2.

Solution/Workaround

This is the expected behavior. When the end user loads a page that contains editable widgets or a custom widget such as Data Grid 2 it is always eagerly loaded, even if the contents of the page are not shown immediately. An editable widget is any widget that has non-read-only attributes. However, the data grid is an exception: even if the data grid has an editable column, it is still considered lazy.

Internal information related

Slack threads: Frontend

Additional information 

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.