The rule you have shown suggests that many of your rules (if not all) compare fact fields with literals. If there are groups of rules where just these literals vary, and the corresponding RHS logic is also uniform (just varying with the values stored or written or whatever), then you might consider reducing the number of rules - perhaps even considerably - by putting those sets of literals into Parameter facts and perform the match with a considerably smaller set of generic rules, one per such a group.<br>
<br>-W<br><br><br><div class="gmail_quote">2011/4/26 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</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;">


  
    
  
  <div text="#000000" bgcolor="#ffffff">
    There is no out of the box way to improve that, beyond just
    partitioning your rulebases yourself.<br>
    <br>
    If you would like to get involved in R&amp;D we can do lazy network
    building and try pushing unused parts of the rule network to disk.<br>
    <br>
    Mark<br>
    On 26/04/2011 12:05, Shebs, Liron wrote:
    <blockquote type="cite">
      
      
      
      <img src="https://mail.google.com/mail/?ui=2&amp;ik=b65f4294c4&amp;view=att&amp;th=12f92618dae8577e&amp;attid=0.0.1.1&amp;disp=emb&amp;zw" style="width: 0pt; min-height: 0pt;" height="0" width="0">
      <div>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Hello All,</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">I’m working at HP
            Software R&amp;D and we are considering using drools in our
            product.</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Benchmarking tests
            showed that running 10,000 rules consumes 382mb. </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">This is too high for
            our system requirements, and we would like to know how we
            can improve it.</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Technical details:</span></p>
        <p><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"><span>-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      </span></span></span><span dir="ltr"></span><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Drools version: 5.1
            with default configuration. </span></p>
        <p><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"><span>-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      </span></span></span><span dir="ltr"></span><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">All rules look like
            this:</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">rule
            &quot;status-Fixed-Open&quot;</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">               when</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">                             event :
            FieldChangedEvent(fieldName == &quot;status&quot;, oldValue ==
            &quot;Fixed&quot;);</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">                             entity :
            Entity(entityType == &quot;mock-entity&quot;);</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">                            
            eval(((String)
            entity.getFieldValue(&quot;status&quot;)).equals(&quot;Open&quot;));</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">              
            then                          </span></p>
        <p class="MsoNormal" style="margin-left: 75pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">                  do Something…</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">end </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"><span>-<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      </span></span></span><span dir="ltr"></span><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Loading code:</span></p>

        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">KnowledgeBuilder
            knowledgeBuilder =
            KnowledgeBuilderFactory.newKnowledgeBuilder();</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">for(all resources)</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">{</span></p>
        <p class="MsoNormal" style="margin-left: 37.5pt; text-indent: 34.5pt;"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">knowledgeBuilder.add(resource,
            ResourceType.DRL);</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">}</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">knowledgeBase =
            KnowledgeBaseFactory.newKnowledgeBase();</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Any insights are most
            appreciated.</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Thank You,</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);">Liron, HP Software
            R&amp;D</span></p>
        <p class="MsoNormal"><span style="font-family: &quot;Comic Sans MS&quot;; color: rgb(153, 51, 255);"> </span></p>
        <div>
          <p class="MsoNormal"><span style="font-size: 11pt; color: rgb(153, 51, 255);"> </span></p>
        </div>
        <p class="MsoNormal"> </p>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </div>

<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>
<br></blockquote></div><br>