Friday, December 20, 2013

Form Performance - Checklist


 q Set the caching of display methods correctly depending on their usage.
Infrequently used display methods should not be cached.

q Set OnlyFetchActive=Yes on datasources if no fields from the table are being used in X++
This optimizes the amount of data that is fetched from the database and moved from the database, to the AOS and finally to the client.

q Set AutoSearch=No on infrequently used datasources and only execute the query when the data is displayed

q Enable or disable controls in a single RPC call to the server.
This means that you get all relevant data needed, and then enable or disable controls on the form based on the data. Do not get a specific piece of data, disable a control, and then get another piece of data (database call), and disable a control, and repeat the process until you have worked through the display elements.

q Wrap calls that cause a layout change or window redraws in element.lock() and element.unLock() to minimize extraneous drawing that result in flicker.
The element.lock() and element.unlock() methods are new in Dynamics AX 2012. When the form is 'locked', the form will not be redrawn (changes in the layout will not be addressed). Once a form is 'unlocked' any layout changes will be made. This has been implemented as a way of minimizing the times a form has to update the layout.

q Minimize the work that you do in a datasource's active() method.
Like accessing additional database, complex calculations in datasource's active() method.

q Make first FactBox on your form cheap to display.
The first FactBox is expanded initially by default,the data retrieved for the fact box is not a complex query, and that it will execute quickly.


q Correctly set the LinkType property of datasources to minimize the number of queries sent to the server.

No comments:

Post a Comment