When there is no rule with dynamic priority, you can set the useStaticAgenda property to true to improve performance by reducing the memory.
By definition, a static priority rule has a priority defined as a constant expression which can be evaluated during the parsing of rules. In contrast, a dynamic priority rule has a priority declared as a complex expression depending on runtime variables such as ?context or rule condition bindings. A dynamic priority cannot be evaluated during the parsing of the rules but is achieved just before the rule instances are created in relation with satisfying a rule tuple and inserted into the agenda.
When there is no rule with dynamic priority, you can activate the static agenda optimization mode by setting the ilog.rules.engine.useStaticAgenda ruleset property to true. This mode delays the rule instance creation, when it is necessary, to just before the rule is executed. Contrary to the default engine, the optimized RetePlus generates no list of rule instances. This strategy reduces memory consumption and improves performance when rule instances are removed from the agenda during rule execution.
In other respects, the optimized RetePlus engine has the same behavior as the default engine. Hence, the refraction principle, the rule priority, and the recency principle are fully respected. However, because there is no rule instance list, some methods of the Decision Server rule engine API pertaining to agenda management are not supported in this mode.
Calling the following IlrContext methods when the static agenda mode is activated raises UnsupportedOperationException instances:
IlrContext removeAllInstances
IlrContext. removeInstance
IlrContext. removeInstances
IlrContext. enumerateInstances