What’s the best way to handle complex filtering (multi-select, range, typeahead) in Mendix without affecting performance on large datasets?

0
I'm building a reporting or search page where users apply multiple filters like multi-select dropdowns, numeric ranges, and search-as-you-type. What’s the best approach to avoid slowdowns, especially when the data source is large?
asked
2 answers
1

Hi Mouli Dharan,

Please refer to the following best practices related to performance in Mendix when implementing complex filtering:

The most efficient way to handle scenarios like multi-select, range filtering, and typeahead searches is to use non-persistent helper entities to store the filter inputs. You can then apply these filters in a microflow data source, which enables you to retrieve only the relevant data from the database using proper constraints—rather than loading the entire dataset and filtering on the client side.

To ensure optimal performance, keep in mind the following:

  • Use pagination to avoid loading too many records at once.

  • Apply indexes on attributes used in filtering for faster queries.

  • Avoid using complex XPath constraints directly on pages, especially with large datasets.

  •  For typeahead inputs, use microflow or nanoflow sources with a result limit to maintain responsiveness.

This approach scales well and keeps the app performant even with large datasets.

Hope this helps!

 

answered
1

Hello Mouli Dharan,

 

A good start is to challenge the wish of the business to have multiple filters.

After you can follow the best practices written down by mendix :

 

https://docs.mendix.com/refguide/community-best-practices-for-app-performance/

 

Hope this helps,

 

Good luck!

 

answered