One proposal: Don't put the values to which you compare the attributes into rules; put them into additional facts. Consider:

rule "bounds_a_1_10"
when
   Fact( a >= 1 && <= 10 )
then ... end

and  similar for 11:100, 101:1000,... could be handled by a single rule and a set of Limit-type facts:

rule "bounds_a"
when
  Limit( ?low : low, ?high : high, ?x : x )
  Fact( a >= ?low && <= ?high )
then
   // enact consequence, parameterized with ?x
end

HTH
-W


2009/9/25 Ševčík Martin <MaSevcik@cpoj.cz>

Hello,

 

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.

 

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.

 

Thank you

 

Martin


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users