Member attributes: Optimization

This attribute controls the optimization level when generating code for a particular profile member.

Syntax

None

Low

Medium

High

Discussion

The value of the attribute Optimization affects the code generation. Depending on the value of this attribute, the Code Generator may perform different code simplification and elimination steps. Following levels are available:

Level

Description

None

No optimization is performed.

Low

Performs rudimentary optimization steps. All non-overridden methods are invoked directly, without an indirection through a virtual method table (VMT). Wherever possible properties are accessed without the invocation of their onget or onset methods.

Medium

Like the level Low. Additionally the layout of Chora objects is optimized in order to reduce the RAM usage. The exact behavior of this optimization level depends on the particular Code Generator. Usually the order of the object’s members is modified in order to arrange small 8/16 bit variables together.

High

Like the level Medium. Additionally all unused (unreferenced) project members are excluded from the code generation (eliminated). This optimization level results in the smallest and fastest GUI applications. You can override the automatic elimination of a member by setting its Generator attribute to the value true.

Modify the attribute

To inspect or modify the value of an Optimization attribute, select first the affected profile member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available assistant you can activate by clicking on the button right to the attribute. The assistant lists all appropriate values for this attribute:

Please note, the attribute can be hidden if it is not supported by the Platform Package selected in the particular profile member.