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.

Regards,


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Wed, Apr 9, 2014 at 11:16 AM, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
If it's general enough, it is not something to be shrugged off as "not
that hard".

You'll have to keep the fact and memorize all rules it fires, and
create a mechanism that'll let you call right hand sides when the
duplicate fact
arrives and with all variables bound to the same values. Huh!

-W

On 09/04/2014, Esteban Aliverti <esteban.aliverti@gmail.com> wrote:
> The question here is: what is the result of fireAllRules()? Caching the
> result of this method is trivial: it's just a number! I think that what you
> need to build is your own ad-hoc cache that knows how to extract a 'result'
> out of the session an keep it handy. Implementing this mechanism shouldn't
> be that hard (at least for simple - no nested- Facts) and once you have it
> you can validate the benefits.
>
> Regards,
>
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> - Blog @ http://ilesteban.wordpress.com
>
>
> On Wed, Apr 9, 2014 at 11:02 AM, Leonard93
> <leonardlindenau@hotmail.com>wrote:
>
>> Wouldn't that depend on how long the data is being kept and how often
>> identical rules are being fired?
>>
>> Or would you say the rule engine is faster than all the actions in
>> between
>> that it wouldnt matter?
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Identical-Facts-over-rules-results-being-cached-tp4029169p4029172.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users