Overview

Overview of using code density in sequential mode.

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. When necessary, the bytecode is automatically split among several .class files in memory. Because the sequential mode compiler deals with a high-level language, it does not recognize whether the bytecode that corresponds to the rules reaches 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 are likely to be reached.

You can control how .class files are split by the sequential mode compiler by using the code.density property.

The generated bytecode density is a floating-point value between 0.1 and 2:

  • A value of 0.1 means that the .class splitting should be done ten times more than the default.

  • A value of 2 means than it should be done two times less than the default.

  • The default value is 1.

Specify a low code density only when the rules are obviously complicated and individually crowded with code in their condition parts or action parts. Large amounts of code tend to consume the .class resources faster than small amounts.

Specify a high code density only when the rules are obviously simple.

You can specify the generated bytecode density for the sequential mode in three different ways:

  • IRL property

  • Java API

  • Java property