Hi, Laun,

 

I might be dull but what does this indicate? Drools did OPTIMIZE MVEL
dialect? But call it twice means optimization?

 

Best

Abe

 

发件人: [email protected]
[mailto:[email protected]] 代表 Wolfgang Laun
发送时间: 2012年1月5日 16:53
收件人: Rules Users List
主题: [rules-users] MVEL performance penalty

 

Drools 5.3.0 FINAL.

This experiment was inspired by code posted with the insinuation that MVEL
would "optimize" condition evaluation. - Consider this rule:

rule "Term - java"
dialect "java"
when
   $ea : EasyApp( Test.valueInList( $ea.getProductCode(), "CAR" )==true
                  && age < 0 )
then end

You'd expect that Test.valueInList() is called once per inserted EasyApp
fact, and this can be verified easily. - Now the same rule, with MVEL's
syntactic sugar:

rule "Term  - mvel"
dialect "mvel"
when
    $ea : EasyApp( Test.valueInList( productCode, "CAR" )==true
                   && age < 0 )
then end

Now Test.valueInList() is called twice for each inserted fact.

Cheers
Wolfgang



_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to