<div dir="ltr">I'm assuming some kind of stateless classification-type knowledge base. As Wolfgang says, if the RHS of your rules are executing code outside the ksession itself (other than just insert/modify/retract facts), then the implementation is much much complex and I don't think it worth it.<div>
<br></div><div>Regards,</div></div><div class="gmail_extra"><br clear="all"><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a></div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 11:16 AM, Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If it's general enough, it is not something to be shrugged off as "not<br>
that hard".<br>
<br>
You'll have to keep the fact and memorize all rules it fires, and<br>
create a mechanism that'll let you call right hand sides when the<br>
duplicate fact<br>
arrives and with all variables bound to the same values. Huh!<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 09/04/2014, Esteban Aliverti <<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>> wrote:<br>
> The question here is: what is the result of fireAllRules()? Caching the<br>
> result of this method is trivial: it's just a number! I think that what you<br>
> need to build is your own ad-hoc cache that knows how to extract a 'result'<br>
> out of the session an keep it handy. Implementing this mechanism shouldn't<br>
> be that hard (at least for simple - no nested- Facts) and once you have it<br>
> you can validate the benefits.<br>
><br>
> Regards,<br>
><br>
><br>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
><br>
> Esteban Aliverti<br>
> - Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
><br>
><br>
> On Wed, Apr 9, 2014 at 11:02 AM, Leonard93<br>
> <<a href="mailto:leonardlindenau@hotmail.com">leonardlindenau@hotmail.com</a>>wrote:<br>
><br>
>> Wouldn't that depend on how long the data is being kept and how often<br>
>> identical rules are being fired?<br>
>><br>
>> Or would you say the rule engine is faster than all the actions in<br>
>> between<br>
>> that it wouldnt matter?<br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://drools.46999.n3.nabble.com/Identical-Facts-over-rules-results-being-cached-tp4029169p4029172.html" target="_blank">http://drools.46999.n3.nabble.com/Identical-Facts-over-rules-results-being-cached-tp4029169p4029172.html</a><br>
>> Sent from the Drools: User forum 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>
>><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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>