[rules-users] How to improve performance with large number of rules and facts ?

laune wolfgang.laun at gmail.com
Mon Aug 5 07:36:51 EDT 2013


virajn wrote
> I'm using this project as a experiment. Therefore condition of the all
> rules are same and they will fire once for all the objects. Following is a
> sample.
> 
> when
>         UserProfile( profile == UserProfile.STUDENT )
>         $book : Book( student == true )
> then
>         $book.setEligible(true);
> end

A textbook example of a no-no-rule. If you insert 5000 UserProfile facts and
5000 Book facts this rule will fire 25,000,000 times, and creating these
activations is bound to take time. If you don't test with useful rules you
won't get useful results.

-W




--
View this message in context: http://drools.46999.n3.nabble.com/How-to-improve-performance-with-large-number-of-rules-and-facts-tp4025324p4025330.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list