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
- 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
- Related Zendesk Ticket: 199532 ,191280 ,178429 , 76313 , 174846
- Zendesk ticket 117896: In this ticket, a community-supported component Dataview Loader was suggested to the user, but it is at the moment not supported, although they have attached an example project with 2 alternatives under the documentation: https://github.com/appronto/DataviewLoader/releases/download/4.0/DataViewLoaderAlternative.mpk
Slack threads: Frontend
Additional information
- A few marketplace modules that can be referred to: Skeleton widget, Lazyloading Skeleton Data Placeholder
0 Comments