<div dir="ltr"><br>&nbsp;&nbsp; Start by eliminating the evals and writing your constraints properly inside the patterns. Drools 3+ is orders of magnitude faster than Drools 2.x, but you need to leverage its power in your rules. Please read the manual as the version 3 was a completely rewrite of version 2. Version 4 is an improvement over 3.<br>
<br>&nbsp;&nbsp; As an example, look at this: <a href="http://blog.athico.com/2006/11/rush-hour-and-content-based-routing.html">http://blog.athico.com/2006/11/rush-hour-and-content-based-routing.html</a><br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br>
<br><div class="gmail_quote">2008/9/5 Rout, Sushanta (ThoughtMill) <span dir="ltr">&lt;<a href="mailto:Sushanta.Rout@ihg.com">Sushanta.Rout@ihg.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We were using Drools 2.5 version earlier. Now we have switched to drools<br>
<a href="http://4.0.7." target="_blank">4.0.7.</a> But we see significant issues with performance like drools 4.0.7<br>
is three times slower than 2.5 . Has anybody encountered the issue?<br>
<br>
Here is a sample of the rule, we have some more similar to this.<br>
rule &quot;test&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;dialect &quot;java&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;activation-group &quot;group1&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$croNumberDetailsRequest : CRONumberDetailsRequest()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$resdirectPhoneNumber : ResdirectPhoneNumber()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;eval($resdirectPhoneNumber.getType().getId() == 5 &amp;&amp;<br>
<br>
$resdirectPhoneNumber.isValidForBrand($croNumberDetailsRequest.getBrand(<br>
)) &amp;&amp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $croNumberDetailsRequest.getRegion() != null &amp;&amp;<br>
<br>
$resdirectPhoneNumber.isValidRegion($croNumberDetailsRequest.getRegion()<br>
) &amp;&amp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $croNumberDetailsRequest.getLocale() != null &amp;&amp;<br>
<br>
<br>
$resdirectPhoneNumber.isValidForLocaleId($croNumberDetailsRequest.getLoc<br>
ale()) &amp;&amp;<br>
<br>
$resdirectPhoneNumber.isValidSlot($croNumberDetailsRequest.getSlot()));<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ResultList.add($resdirectPhoneNumber);<br>
end<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>