[rules-users] Predicate expression effect on performance

Michael Neale michael.neale at gmail.com
Fri Jul 20 00:33:06 EDT 2007


In a sense, yes - but its the result of the comparison that is "cached"
really.

In the case you described, it is subrule generation. So either side of the
"or" is like a separate rule.
In version 3, the result of isSameAmount (ie if it was true or false) is
"cached".

Things will only be re-checked if the "Check" fact changes (and the engine
knows about the change).

Note that this checking happens as you are asserting objects, not when you
"fireAllRules" necessarily.

On 7/20/07, Yuri de Wit <ydewit at gmail.com> wrote:
>
> What is the extent of the performance impact caused by using predicate
> expressions?
>
> Check( amount == $amount )
> or
> Check( $amt : amount -> (isSameAmount($amt, $amount) )
>
> My understanding is that once asserted the amount property will be
> "cached" in the shadow fact, is the result of isSameAmount(...) also
> cached?
>
> thanks,
>
> -- yuri
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070720/0ac865f0/attachment.html 


More information about the rules-users mailing list