Slow retrieve over association

Hi, I have a page with 2 listviews: One for groups and one for persons. On the page I want to show the persons for every group. My group listview will always retrieve 10 groups, based on some filters. For every group an non-persistent object is created and a list of person objects (also 10) is retrieved and associated to this object (since it can be filtered). My person listview only does a retrieve of the persons over association. I placed some log messages and I see that the retrieve within the person listview (so the retrieve over association) can take up to more then one second per group. Some retrieves only take 30 ms, but some 500-1500. Does anyone has an idea how to improve this?
1 answers

If you say you have placed some log messages, I assume you are retrieving the objects through a microfow. This is usually slower than retrieving through XPath. Although retrieving through XPath is not always possible since you may want to show dirty state, it should be a bit faster, since the queries can be optimized.

Second, if you have groups and persons, you may have modelled this as a many to many association. On such associations, setting the navigability to ‘groups and persons refer to eachother’ depending  can have a very negative effect on performance, since Mendix has to do many joins before having access to the object. Reverting this to a default navigability could solve your issue.