<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 08.00.0681.000">
<TITLE>RE: [rules-users] Drools, Performance issues on 4.0.7 Vs 2.5</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I'll say it before someone else...<BR>
<BR>
Evals are the devil, avoid them. From memory, the newer drools handles old rules poorly, using extensive use of evals. It's the reason we have not moved up to the newest version yet. It's probably not pretty but you may have to rewrite/reconfigure your rules to avoid the use of evals, if that 3x performance is a significant issue.<BR>
<BR>
-Michael<BR>
<BR>
-----Original Message-----<BR>
From: rules-users-bounces@lists.jboss.org [<A HREF="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</A>] On Behalf Of Rout, Sushanta (ThoughtMill)<BR>
Sent: Friday, September 05, 2008 10:32 AM<BR>
To: Rules Users List<BR>
Subject: [rules-users] Drools, Performance issues on 4.0.7 Vs 2.5<BR>
<BR>
We were using Drools 2.5 version earlier. Now we have switched to drools<BR>
4.0.7. 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;&nbsp;&nbsp;&nbsp; dialect &quot;java&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; activation-group &quot;group1&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $croNumberDetailsRequest : CRONumberDetailsRequest()<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $resdirectPhoneNumber : ResdirectPhoneNumber()<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval($resdirectPhoneNumber.getType().getId() == 5 &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
$resdirectPhoneNumber.isValidForBrand($croNumberDetailsRequest.getBrand(<BR>
)) &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $croNumberDetailsRequest.getRegion() != null &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
$resdirectPhoneNumber.isValidRegion($croNumberDetailsRequest.getRegion()<BR>
) &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $croNumberDetailsRequest.getLocale() != null &amp;&amp;<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
$resdirectPhoneNumber.isValidForLocaleId($croNumberDetailsRequest.getLoc<BR>
ale()) &amp;&amp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
$resdirectPhoneNumber.isValidSlot($croNumberDetailsRequest.getSlot()));<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ResultList.add($resdirectPhoneNumber);<BR>
end<BR>
<BR>
_______________________________________________<BR>
rules-users mailing list<BR>
rules-users@lists.jboss.org<BR>
<A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A><BR>
</FONT>
</P>

</BODY>
</HTML>