fireAllRules will only fire all the rules that where activated during the insertion phase. So basically when you call it at the end, it will only fire all those rules activated. If you insert a fact that doesn't activate any rule you don't need to call fire all rules.<br>
<br><br><div class="gmail_quote">On Tue, Jul 27, 2010 at 1:54 PM, sjoo822 <span dir="ltr"><<a href="mailto:sean.joo@gmail.com">sean.joo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I have several thousand objects that gets inserted into a statefull knowledge<br>
session as show below:<br>
<br>
for (Item item : itemList)<br>
{<br>
session.insert(item);<br>
}<br>
<br>
session.fireAllRules();<br>
<br>
<br>
Assuming that all the conditions in the rules only concern with one item at<br>
a time, will there be a big performance difference if I changed the above to<br>
as shown below?<br>
<br>
for (Item item : itemList)<br>
{<br>
session.insert(item);<br>
session.fireAllRules();<br>
}<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-performance-tp999935p999935.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/fireAllRules-performance-tp999935p999935.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<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>
</font></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a> <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
- Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino "Salaboy" Mauricio -<br>