<br> Eymeric,<br><br> I think what you have there is a combinatorial explosion. I.e. 5 patterns, all of the same type, doing an almost full cross product (limited only by the type attribute constraint). If you check the agenda I would expect to see a huge number of activations (it should be all possible combinations of your 53 objects).
<br><br> Anyway, there are a few fixes made to 4.0.1, including some that affect memory usage. One of the fixes we did was for increasing number of rule fires, as you can see in the following test case. Look for testOutOfMemory() method. It is a bit different of what you do, but using default 64Mb heap configuration, I left the test running 100million+ rule firings and the memory didn't blow up. The test is now limited to 3million fires so we can keep it as part of our build process. Before the fix, it was raising OOME on
1.7million fires.<br><br><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
</a><br><br> Personally I think 53 objects is absurdly low. We have real use cases of companies asserting millions of facts into the working memory at once and it works just fine, with real rule sets of hundreds of rules. Maybe they manifest themselves after reading this message.
<br><br> If you think this is indeed a problem, may I ask you please to open a JIRA and submit us a self contained test showing the problem? I will profile your test and determine the causes and if it is a problem on the engine, I will fix it.
<br><br> Thank you,<br> Edson<br><br><div><span class="gmail_quote">2007/8/29, Eymeric VIEUILLE <<a href="mailto:evieuille@gfi.fr">evieuille@gfi.fr</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi !<br><br>I am currently leading a study that compares BRMS. The aim of this study<br>is to determine if a rules engine can be used for our application and<br>what rules engine to use.<br><br>I made a prototype and I encountered a big problem of memory : no more
<br>than 53 objects could be passed as facts. After this threshold, I<br>encountered a java.lang.OutOfMemoryException :<br>Exception in thread "main" java.lang.OutOfMemoryError: Java heap space<br><br>I increased the memory allocated to the JVM, but the more I insert
<br>objects as Facts and the more Drools becomes slower !<br><br>I think that the problem is exactly the same as the following one :<br><a href="http://lists.jboss.org/pipermail/rules-users/2007-August/002592.html">http://lists.jboss.org/pipermail/rules-users/2007-August/002592.html
</a><br><br>Can you confirm to me that is the same problem ? And in a positive<br>affirmation, how to solve this problem ? And how much time would it take ?<br><br>I am using drools 4.0 (developing whith associated eclipse IDE).
<br><br>I realized a dslr that looks like this :<br>package com.sample<br><br>import XXX.Message;<br>import XXX.MyObject;<br><br>expander leg_recognizer.dsl<br><br>rule "rule 1"<br> no-loop true<br> when<br>
$m1 is an "OUT" marker<br> $m2 is an "OFF" marker<br> $m3 is an "ON" marker<br> $m4 is an "IN" marker<br> $m4 event date is more than $m1 event date
<br> then<br> print "Rule 1"<br> display message $m1<br> display message $m2<br> display message $m3<br> display message $m4<br> make $m1 treated<br> make $m2 treated
<br> make $m3 treated<br> make $m4 treated<br> create a object "1" with state "active";<br>end<br><br>rule "rule 2".............(same principle) --> 6 rules in the real file.
<br><br>And it uses the following dsl file :<br>[condition][]{message} is an "{state}" marker={message} : Message(type<br>== "{state}")<br>[consequence][]print "{string}"=System.out.println("{string}");
<br>[consequence][]display message {object}=System.out.println("Message : "<br>+ {object});<br>[consequence][]create a object "{id}" with state "{state}"=insert(new<br>MyObject("{id}", "{state}"));
<br>[consequence][]make {message} treated=retract({message});<br>[condition][]{message1} event date is more than {message2} event<br>date=eval({message1}.isALaterEventThanMessage({message2}))<br><br>Did I made a mistake in the use of Drools or is this a bug ?
<br><br>Thanks for answers...That's quite urgent !<br><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>