Decision model performance guidelines
For optimal performance when running decision models, we recommend that you follow these guidelines. Reviewing these guidelines is especially useful when testing the speed of decision model variants.
To improve the performance of a decision model variant, consider the following recommendations:
-
Reduce the number of components on the decision canvas - the number of components on a decision canvas can result in suboptimal performance. In addition, if a decision model variant contains an input component that is linked to several decisions, evaluate whether the input component is required by all the decisions and delete any unnecessary links.
-
Factor in the size of guest profiles - when gauging performance speed, factor in the number of sessions and events a typical guest profile in your organization captures. The guest profiles with more session and event data take longer to process. Ensure that when you test decision model variants, you pass in some guest profiles with larger payloads.
-
Reduce the number of data systems or artificial intelligence components in a decision model variant - it is best practice to only include two data systems and/or artificial intelligence components in a decision model variant, although more can be supported.
-
Limit the number of programmable decisions on the canvas to three or four.
-
Ensure that when you structure the decision model variant, there is only one ultimate decision at the top of the canvas with no outgoing requirement flows.
-
Combine programmable decisions - combining two programmable decisions into one can improve performance, especially if they are both used to extract the same data.
-
Limit loops in a decision - limiting the number of loops in programmable decisions or decision tables that use JavaScript as input can significantly increase the execution speed of a decision model variant. Terminate loops and functions promptly by using
breakorreturnstatements once the you retrieve the necessary data. For example, when searching for the latest page view in a guest session, exit the function immediately upon finding the page. -
Working with dates and times - using native date handling methods (
Date,Intl.DateTimeFormat) in programmable decisions is strongly recommended. External libraries likemoment.jscan impact performance. For guidance and examples, see Including dates in programmable decisions. -
Refactor decision tables to reduce size - reducing the number of rows and columns in a decision table can drastically improve performance. For example, avoid repetition of logic. Sometimes using a dash (-) symbol in a rule to ignore a condition can enable you to delete several rows.