I think Negoita, Cristian wrote:
> Hi all,
> 
> I am using Rete engine to load up large amount of facts in the working
> area. (let's say 50.000 facts of type A and 500.000 facts of type B)
> 
> The problem is that: if I load FIRST facts A, these are loaded fast, but
> AFTER that, facts B are loaded very slowly.

Remember that pattern-matching -- i.e., rule evaluation -- happens
while facts are being asserted, modified, or retracted. The time it
takes to assert a fact depends entirely on how much work Jess has to
do to evaluate the rules that potentially match that fact.

Based on what you've said, you've got one or more rules that match
both an A and a B fact, with little restrictions, such that you're
getting 50,000 times 500,000 or 25000000000 partial matches, which
will consume plenty of both space and time. Some simple changes to the
way in which you express your rules could reduce this by many orders
of magnitude, drastically speeding things up.

So we'll have to see your rules. Show us the ones that match both an A
and a B fact.

---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to