Hey João,
I'm going to answer your question giving some examples/tips for each topic.
Optimizing Database Queries
Make sure the attributes you query often have indexes. This can make reading data much faster.
Break down complex XPath queries into smaller, simpler ones whenever you can
Try not to use functions like "contains" in XPath queries on large datasets because they aren't indexed and can slow things down
When dealing with large datasets, process them in batches instead of all at once to avoid overloading the system
Efficient Use of Microflows and Nanoflows
Avoid using nested loops if possible, as they can significantly slow down your application
Consider using asynchronous microflows to keep the user interface responsive
Use in-memory cache (like non-persistent entities) for data that is accessed frequently
Best Practices for Using Widgets and Custom JavaScript
Whenever possible, use the built-in widgets provided by Mendix because they are optimized for performance
Write efficient JavaScript, minimizing changes to the DOM
Handling Large Datasets
Aggregate and process data on the backend to reduce the amount of data sent to the client
Split large entities into smaller, related entities to handle data more efficiently
Process large datasets in batches to manage the load better
General tips for performance
Doc: https://docs.mendix.com/refguide/community-best-practices-for-app-performance/
Best Regards,
Ricardo Pereira
Hello Joao,
A good place to start is here with the documentation of mendix:
https://docs.mendix.com/refguide/community-best-practices-for-app-performance/
Further does the mendix bot best practice recommender helps you in studio pro with aligning your application to these best practices.
Big difference makers for me where mainly the set up of your domain model, using denormalization, using indexes, and trying to use asynchronous call/processes if possible.
But there is many many more
Hope this gives you a nudge in the right direction
Good luck!