Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-2799

DMN Optimize DT parameter binding for compilation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • dmn engine
    • None

      Currently, DMN layer Evaluator method:

      org.kie.dmn.core.ast.DMNDTExpressionEvaluator.evaluate(org.kie.dmn.api.core.event.DMNRuntimeEventManager, org.kie.dmn.api.core.DMNResult)
      

      calls down to FEEL layer function:

      org.kie.dmn.feel.runtime.functions.DTInvokerFunction.invoke(org.kie.dmn.feel.lang.EvaluationContext, java.lang.Object[ ])
      

      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 is not really as fast as it could be across several evaluation.

      The current proposal leverage compilation for the parameter (names) which are actually FEEL expression, in order to move from this scenario:

      to this:

      Conclusion the current proposal optimize the DMN parameter binding for the Decision Table invocation across several evaluations by at least an order of magnitude*

      * if compared to baseline, using a JUnit test part of the actual code base as benchmark

        1. BEFORE.png
          BEFORE.png
          65 kB
        2. AFTER.png
          AFTER.png
          64 kB

            mmortari@redhat.com Matteo Mortari
            mmortari@redhat.com Matteo Mortari
            Tibor Zimányi Tibor Zimányi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: