Hey,<br><br>I had a similar issue where a massive log file was being generated due to the activation and cancellation of rules outside of the current ruleflow-group. My issues were not strictly performance related, I just didn't want to sift through thousands of lines of logging. This is one way I resolved my issue:<br>
<br>declare GroupOneFinished<br>end<br><br>rule "simple rule in group one"<br>ruleflow-group "group one"<br> when<br> DomainObject(expression == true)<br> then<br> //do something<br>end<br><br>rule "last rule to fire in group one"<br>
ruleflow-group "group one"<br>salience -100<br> when<br> not GroupOneFinished()<br> then<br> insert(new GroupOneFinished());<br>end<br><br>rule "simple rule in group two"<br>ruleflow-group "group two"<br>
when<br> GroupOneFinished()<br> DomainObject(costlyExpression == true)<br>then<br> // do something<br>end<br><br>Clearly, this is not a pretty solution and, depending on how drools handles the order of evaluation (does it stop trying to activate "simple rule in group two" as soon as it realizes there is no GroupOneFinished object?), may not add any performance gain, but it definitely reduced the size of my log file!<br>
<br>Hope it helps,<br>Enda<br><br><div class="gmail_quote">On Mon, Jan 10, 2011 at 4:43 PM, H.C. <span dir="ltr"><<a href="mailto:canterburry@gmail.com">canterburry@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hey,<br>
<br>
We are dealing with performance issues at the moment are trying to find ways<br>
to improve the performance of our conditional statements.<br>
<br>
We see that when an update happens, drools will evaluate conditional<br>
statements of rules outside of the ruleflow-group currently active.<br>
<br>
Is there a way to prevent this from happening? It would substantially reduce<br>
the number of rules being evaluated and improve performance for us.<br>
<br>
Thanks for any help.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Performance-issue-why-are-rules-outside-of-ruleflow-group-evaluated-tp2228232p2228232.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Performance-issue-why-are-rules-outside-of-ruleflow-group-evaluated-tp2228232p2228232.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Enda J Diggins<br>