<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    I've a big rule file that contains *many* rules like this:<br>
    <br>
    <small>rule "rule1" <br>
      when <br>
          $obj1: OBJ(a==false, b=="C") <br>
          $obj2: OBJ(b=="B", a==false)<br>
      then <br>
       &lt;...&gt;<br>
      end</small><br>
    <br>
    <big>Inspecting the RETE tree I've noticed that the first layer
      contains two alpha node, one for "a==false" and one for "b=="B",
      than the second layer contains the duplicate alpha node for
      "a==false" and one for "b==C". This is somewhat (at least for me)
      counter intuitive, because I thought</big> <big>the algorithm
      would  be a little bit smarter trying to order the clauses from
      the most restrictive to the least.<br>
      I there a particular reason why this optimization it's not
      implemented? It's difficult or semantically incorrect?<br>
      <br>
      I've noticed this because compiling this file with many rules
      which have no particular order on clauses led to a tree with a
      extremely large first level. This obviously was detrimental but a
      simple ordering of the clauses fixed it.<br>
      This became a problem only when we upgraded form 5.0.1 to
      6.1.0-Final. Why I didn't noticed any performance problem with the
      previous version of Drools?<br>
      <br>
      Thanks in advance.<br>
      <br>
      Federico.<br>
    </big>
  </body>
</html>