Hi all, What I am now trying to achieve is a reusing of Rete engine(s). Let's suppose I have Rete engine(s) initialized with some rules and some STATIC facts (I mean not changable facts, in a big number).
I take one of this initialized engine from, lets say, a pool of RETE engines, I add some VOLATILE facts, the rules will fire, some actions will be taken... After that, what I want to achieve is to clean up the RETE engine fast, I mean to remove only the VOLATILE facts, NOT the STATIC ones, and to put this engine back to pool, to be available to another request. Pretty much like a JDBC connection pool. The reason for that is to avoid loading up the STATIC facts for each processing, because the are too many and this operation is time-consuming. What I have noticed: 1) If I store the VOLATILE facts in a collection and I remove them one by one from working memory, (with Rete.retract method) it's too time consuming; I mean much slower than Rete.reset() command. 2) If I define the STATIC facts inside of a Deffacts construct, and the VOLATILE facts as simple Facts, then the reset() will become expensive as it will practically reload the STATIC facts in working memory. My question would be how could I implement removing the VOLATILE facts as fast as posible? It may be a third way, or should I think of another strategy to meet my performance requirements? Many thanks Cristian Negoita -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
