[rules-users] Memory Consumption with 5000 Rules

Mark Proctor mproctor at codehaus.org
Thu Dec 9 17:32:30 EST 2010


Each 'or' will generate a rule, so that's more like 50K rules.

Mark
On 09/12/2010 22:08, thomas.polzin at gmail.com wrote:
> Dear all,
>
> My setup includes about 5000 rules with the following pattern:
>
> rule "1"
> when
> (
> $c_0 : CFRO( fi.co == "1", su.co == "P", c.co == "C") or
> $c_0 : CFRO( fi.co == "2", su.co == "P", c.co == "C") or
> $c_0 : CFRO( fi.co == "3", su.co == "P", c.co == "C") or
> $c_0 : CFRO( fi.co == "4, su.co == "P", c.co == "C") or
> $c_0 : CFRO( fi.co == "5", su.co == "P", c.co == "C")
> )
> then
> Bcf fact = new Bcf ();
> fact.setC( "123");
> insert( fact);
> end
>
> The number of disjunctions varies, it might go up to 80. Just loading 
> these 5000 rules uses about 200mb. I use 5.1.1.
> Is this to be expected or do I something fundamentally wrong. Any help 
> highly appreciated. For instance, would it
> make sense to use a rule for each of the disjunction?
>
> I add the rules the with the following code:
>
> DroolsObjectInputStream stream = new DroolsObjectInputStream(inputStream);
> Collection<KnowledgePackage> knowledgePackages = 
> (Collection<KnowledgePackage>)stream.readObject();
>
> stream.close();
> engine.addKnowledgePackages(knowledgePackages);
>
> Many thanks in advance
>
> Thomas
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101209/9fac976d/attachment.html 


More information about the rules-users mailing list