I was careful to start a new thread with an appropriate subject that (I think) indicates that MVEL causes trouble. The boldface sentence says that dialect MVEL executes two calls where dialect Java succeeds with a single call.
(I don't think that the original poster really saw an "optimization".)
-W
Hi, Laun,
I might be dull but what does this indicate? Drools did OPTIMIZE MVEL dialect? But call it twice means optimization?
Best
Abe
发件人: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] 代表 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
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users