| ILOG JRules User Guide > Running and Debugging > Tasks > Troubleshooting Execution > Using Code Density |
Using Code Density |
PREVIOUS NEXT |
This section describes how you can troubleshoot bytecode errors generated in sequential mode. The bytecode that is generated on the fly by the sequential mode can handle a huge number of rules without reaching the Java .class format limits. The bytecode is automatically split, when necessary, among several .class files in memory. Since the sequential mode compiler deals with a high-level language, it does not recognize if the bytecode that corresponds to the rules will reach the Java .class limits or not. (This is also true for traditional javac compilers.) The sequential mode compiler can only estimate when Java .class limits will almost certainly be reached.
You can control the .class splitting that is performed by the sequential mode compiler using a code density property.
The generated bytecode density is a floating-point value between 0.1 and 2.
.class splitting should be performed ten times more than the default.
A low code density should be specified only when the rules are obviously complicated and individually crowded with code in the condition part or in the action part. Large amounts of code tend to consume the .class resources more quickly than small amounts.
A high code density should be specified only when the rules are obviously simple.
| Important |
| The code density property is relevant only for troubleshooting. You would not normally need to adjust it. |
You can specify the generated bytecode density for the sequential mode:
You can specify the generated bytecode density in IRL at task level, or for a particular task.
To specify code density in IRL at task level:
You can also define the code density for a particular task using a special generic notation.
To define the code density for a particular task:
You can set the ruleset property using the API. In this case, you need to set the property prior to any parsing. This enables the code density property to be taken into account even in the static case where the sequential ruletask is defined by an explicit list of rule names.
To specify code density using the API:
You can define the code density for the sequential mode by setting a Java property, typically when launching the application.
To specify code density in Java:
Notice that the name of the variable must be fully qualified with ilog.rules.engine so as not to conflict with other Java variables.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |