One proposal: Don't put the values to which you compare the attributes into rules; put them into additional facts. Consider:<br><br>rule "bounds_a_1_10"<br>when<br> Fact( a >= 1 && <= 10 )<br>
then ... end<br><br>and similar for 11:100, 101:1000,... could be handled by a single rule and a set of Limit-type facts:<br><br>rule "bounds_a"<br>when<br> Limit( ?low : low, ?high : high, ?x : x )<br> Fact( a >= ?low && <= ?high )<br>
then<br> // enact consequence, parameterized with ?x <br>end<br><br>HTH<br>-W<br><br><br><div class="gmail_quote">2009/9/25 Ševčík Martin <span dir="ltr"><<a href="mailto:MaSevcik@cpoj.cz">MaSevcik@cpoj.cz</a>></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 link="blue" vlink="purple" lang="SK">
<div>
<p><span lang="EN-US">Hello,</span></p>
<p><span lang="EN-US"> </span></p>
<p><span lang="EN-US">I’m using drools 4.0.7. I have excel
with about 4000 rows. After compiling it, the final Package is about 30 MB. And
that’s only one sheet, I have 3 of them. Total size is about 60MB. It’s
too big to hold it in memory, but too slow to read it from a file or database
every time. Is there any chance to make the package smaller. It’s always
the same rule, just different values of attributes (that’s why we use
excel) and I think, after compilation there are many information redundant in
the package (they are repeating over and over for every row / rule. </span></p>
<p><span lang="EN-US"> </span></p>
<p><span lang="EN-US">Do you have any solution how to solve this.
It’s a tariffication algorithm, and the response must be quick. Executing
is not a problem, just how to store this big package. </span></p>
<p><span lang="EN-US"> </span></p>
<p><span lang="EN-US">Thank you</span></p>
<p><span lang="EN-US"> </span></p><font color="#888888">
<p><span lang="EN-US">Martin</span></p>
</font></div>
</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>