soundasleep / iaml

Automatically exported from code.google.com/p/iaml
3 stars 1 forks source link

Change 'update' CompositeOperation inference to a PrimitiveOperation #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?
Currently all 'update' and 'init' operations are generated with explicit 
operational modelling contents; i.e., every update operation will have the same 
16 contained ActivityNodes and edges.

Consequently, I have found that implementation of Ticket 2.0 is slow, and at a 
certain point, inference cannot continue as the JVM runs out of heap space (due 
to the large number of tuples in the Drools working memory):

Step 0: 155 elements
Step 1: 461 elements
Step 2: 1434 elements
Step 3: 1503 elements
java.lang.OutOfMemoryError: Java heap space

If the contents of 'update' and 'init' operations are removed from the 
inference, perhaps performance will improve. That is, the default generated 
CompositeOperation 'update' could be changed to a PrimitiveOperation 'update' 
with the same semantics, which would be defined for all Changeable.

The inference rules for a CompositeOperation 'update' could remain, which would 
allow users to still create the default contents of 'update' which are then 
overridden.

The main difficulty with this approach is making sure the semantics between the 
default and the inferred 'update'/'init' operations are the same.

What goal would this enhancement help you achieve?
Hopefully better performance, and being able to support more complicated models.

Original issue reported on code.google.com by soundasleep on 9 Jul 2010 at 3:52

GoogleCodeExporter commented 9 years ago
Upon investigation, the engine is not running out of heap due to the number of 
elements; rather, most likely the complexity of the rules being used to 
generate the elements. In the current Ticket2.0 implementation, the limit seems 
to be around 3500 elements with a 384 MB heap.

Note that more heap is available if inference is done separately from code 
generation.

r2457: replaced 'update' and 'init' CompositeOperations.
There was a saving of 11.5% elements generated.

r2459: replaced 'fieldValue is set' CompositeCondition.
There was an additional saving of 14.5% elements generated.

Original comment by soundasleep on 9 Jul 2010 at 5:59