<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks Edson. Is there any example to rewrite
the rule without rule?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 05, 2008
2:59 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] Drools,
Performance issues on 4.0.7 Vs 2.5</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><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<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2008/9/5 Rout, Sushanta (ThoughtMill) &lt;<a
href="mailto:Sushanta.Rout@ihg.com">Sushanta.Rout@ihg.com</a>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><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><o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>