]
Matteo Mortari updated DROOLS-2799:
-----------------------------------
Attachment: BEFORE.png
DMN Optimize DT parameter binding for compilation
-------------------------------------------------
Key: DROOLS-2799
URL:
https://issues.jboss.org/browse/DROOLS-2799
Project: Drools
Issue Type: Enhancement
Components: dmn engine
Reporter: Matteo Mortari
Assignee: Matteo Mortari
Attachments: BEFORE.png
Currently, DMN layer Evaluator method:
{code:java}
org.kie.dmn.core.ast.DMNDTExpressionEvaluator.evaluate(org.kie.dmn.api.core.event.DMNRuntimeEventManager,
org.kie.dmn.api.core.DMNResult)
{code}
calls down to FEEL layer function:
{code:java}
org.kie.dmn.feel.runtime.functions.DTInvokerFunction.invoke(org.kie.dmn.feel.lang.EvaluationContext,
java.lang.Object[ ])
{code}
In order to evaluate Decision Table using DecisionTableImpl.
Currently, the whole Decision Table FEEL expression/UT are compiled to CompiledExpression
and this enable for fast performance during execution and multiple evaluation, however,
the parameter binding for the invocation from the DMN layer does not leverage FEEL
expression compilation of the parameters ( information/knowledge requirements coming from
the DRG graph ) hence the parameter binding slow down across several evaluation.
The current proposal leverage compilation for the parameter (names) which are actually
FEEL expression, in order to move from this scenario: