PBA Module Performance for Microsoft Dynamics AX (Axapta)

1. Application Area

Product Builder module is a part of standard Dynamics AX (Axapta). It’s used to make items configurable depending on a sales order, a purchase order, or a production order. Based on a configuration and a set of predefined modelling variables, Product Builder module generates standard bills of materials and standard routes of production within Dynamics AX (Axapta). Important processes in the Product Builder are product model compilation and item configuration. In case of intensive work with item configuration, it is important that these (compilation and configuration) operations take acceptable time. Standard Product Builder does not fully meet this performance requirement for complex product models that contain a lot of model variables and advanced model structure. Therefore, standard Product Builder routine was adjusted in order to increase the performance.

2. Performance Conditions

Necessity of improvements in standard Product Builder routine was caused by requirements from several customers. Product Builder setup contained more than 350 model variables. The most of product models contained from 100 to 120 variables and more than 20 nodes with different types per model. Before the performance optimization, it took more than 5 minutes to compile one product model and up to 10-15 seconds to configure one item with relatively good hardware. This duration of the job was not acceptable for the customer. Maximum allowed duration was ordered to be 30 seconds for model compilation and 3-5 seconds for item configuration.

3. Product Builder Optimization

Analysis of standard Product Builder routine has revealed that there are several places to be improved from implementation view.

3.1. Model compilation

Compilation of product models includes compilation of separate model nodes. The idea of optimization is to recompile only non-compiled nodes because at each moment every model node stores status of its compilation (either successful or not).

During product model compilation, standard routine defines acceptable name for proper class where product model is stored. This method is called for every model node and retrieves product model code with memo type. Time expenses for such a call can be extra high. So, the idea is to exclude unnecessary memo fields from SQL operations called in this routine.

3.2. Item configuration

Standard Product Builder routine generates a separate datasource for every model variable. Time expenses for datasource generation and various variable checks can be rather high. Usually, only part of variables is really used in the model. So, it makes sense to limit product model run-time generation with only those product variables which really take part in the model (property “Display” of product variable can be taken as criteria).

Product model can contain table reference variables. Standard Product Builder routine creates combobox controls to allow values selection from linked tables. Time expenses for retrieving data from related tables into combobox controls can be very high (depends on the size of related tables). So, the idea is to replace such combobox controls by lookup controls based on universal lookup form with full support of query engine.

4. Class Diagrams

Figure 1: Product Model compilation

Figure 2: Item configuration

5. Results

Realization of adjustments in Product Builder made it possible to run model compilation within 10 seconds and item configuration within 1-2 seconds. Performance of these jobs was increased 5..30 times compared to standard Product Builder routine.