Rules in this category point out places in your code that could slow down your app. For example, doing a commit inside a loop is shown to have a negative impact on performance.
Performance in Mendix is mostly knowing how the platform executes and handles the various activities you can select in your logic.
Below are some great resources that will help you get a better grasp of how the platform works:
- Top 10 performance improvement tips for Mendix (clevr.com)
- 20 Performance tips for Mendix (clevr.com)
- How to speed up your Mendix App: Part 1 (clevr.com)
- How to speed up your Mendix App: Part 2 (clevr.com)
- How to speed up your Mendix App: Part 3 (clevr.com)
- Just-in-time Performance Management (clevr.com)
- Implement Community Best Practices for App Performance – Studio Pro 9 How-to’s | Mendix Documentation
- Detect & Resolve Performance Issues – Studio Pro 9 How-to’s | Mendix Documentation
- Five tips for working with large database tables in Mendix | by Gajduk Andrej | Mendix Community | Medium
- Performance modeling in Mendix — Indexes | by Martin Leppen | Mendix Community | Feb, 2022 | Medium
Articles
- Calculated attributes should only have fast actions
- Commit entities in the same order in different microflows to prevent deadlock
- Commits should take place outside of a loop
- Dropdown reference selectors should be used sparingly
- Entity should have a maximum of N calculated attributes
- Project role should have at most one module role per module
- Event handler after event should have fast action
- Event handler before event should have fast actions
- Page button synchronous microflows should only have fast actions
- Page data source microflows should only have fast actions
- Page on change microflows should only have fast actions
- Page widget microflows should only have fast actions
- Checking for empty on associations should be done without retrieving
- Scheduled events should be executed with reasonable delay
- Entity should have a maximum of N indices
- Entity should have a maximum of N reference set associations
- Many-to-many associations should have owner “Default”
- Microflow retrieve from database and aggregate should be adjacent
- Microflow should not apply entity access
- Microflows should perform database actions at the end
- Not/or expressions in XPath should be avoided when the path goes over an association
- Only short actions should be used in a loop
- Positive conditions should be preferred when retrieving data
- Retrieve & aggregate combo should not be nullified by using the list
- Retrieves over the same association should be grouped together
- Loops should not have loops inside
- Persistent entities should have indices
- Keep the number of index columns low
- The Uniqueness Validation should be set to Database