nested listviews performance

0
In our application I want to show a list of persons and for every person a list of all days of the month and for every day the list of prestations. It’s some kind of a horizontal timeline calendar view. something like this Ma di wo do 01 02 03 04 ...... 29 30 31 person 1 8h 4h 8h 8h ...... person 2 8h 8h 8h 4h ...... I managed to build this with a listview in a listview in a listview but this generates a lot of /xas requests, because it retrieves first all employees, for every employee it gets the days of the month over association, and for every day it gets the prestations (worked hours) over association. How can I optimize this?
asked
2 answers
1

Hi Olivier,

 

Not sure if it will work out for you, but you may consider to only show days of the month with its prestations per day for a selected employee, instead of all employees. You can put a list view showing all employees on the page, and add another listview with days of the month and prestations. You could make this listen to the employees listview, and make it conditionally visible based on the fact if an employee is selected.

 

Not sure if you would want this, but loading data over one selected employee might be faster then everytime loading all prestations of all days of the month for every employee.

answered
0

Hi Olivier, 

You might also want to look into upgrading to 7.21 because of some important refactoring on datafetching of  listviews. In the release notes Mendix they state:

”Microflow & Association Source Improvements

With this release, we have optimized the data-fetching performance of list views and template grids using a microflow or association source. From now on, if a list view or template grid contains a widget that gets its data over an association (for example, a data view or text box), that associated data will be fetched within the same network request as the main widget’s data.”

Release notes 7.21.0

answered