Resolving slow first execution of a ruleset

You can force class loading during the ruleset loading.

Symptoms

After an update, the first execution of a ruleset takes a long time.

Causes

This can be caused by the order in which the rules are loaded. If the system can wait for the first execution before loading the rulesets.

Environment

Decision engine

Resolving the problem

Make sure you are using asynchronous ruleset parsing. In particular for HTDS, verify the AsynchronousRulesetParsing property.

Set the system property com.ibm.rules.engine.experimental.preload to true to force class loading during the ruleset loading, and not to wait for the first execution.

This property might have side effects and should be used only when recommended by IBM® Support.

Configuration options that might improve performance when using partially compiled rulesets:
  • Exclude unused classes from BOM serialization
    Set the following BOM property on classes that do not need serialization:
    dataio.ignore=true
  • Disable BOM serialization globally
    If BOM serialization is not required, use this system property:
    -Dcom.ibm.rules.engine.datax.enable=false
    Note: This must be configured before rule compilation.
  • Best practice for B2X parsing
    To reduce conflicts during ruleset loading, remove the package of the classes that is used in the code and give preference to the import. This significantly reduces the number of conflicts when the ruleset is loading.