[rules-users] Drools, Performance issues on 4.0.7 Vs 2.5

Edson Tirelli tirelli at post.com
Fri Sep 5 14:59:08 EDT 2008


   Start by eliminating the evals and writing your constraints properly
inside the patterns. Drools 3+ is orders of magnitude faster than Drools
2.x, but you need to leverage its power in your rules. Please read the
manual as the version 3 was a completely rewrite of version 2. Version 4 is
an improvement over 3.

   As an example, look at this:
http://blog.athico.com/2006/11/rush-hour-and-content-based-routing.html

   []s
   Edson

2008/9/5 Rout, Sushanta (ThoughtMill) <Sushanta.Rout at ihg.com>

> We were using Drools 2.5 version earlier. Now we have switched to drools
> 4.0.7. But we see significant issues with performance like drools 4.0.7
> is three times slower than 2.5 . Has anybody encountered the issue?
>
> Here is a sample of the rule, we have some more similar to this.
> rule "test"
>        dialect "java"
>        activation-group "group1"
>        when
>                $croNumberDetailsRequest : CRONumberDetailsRequest()
>                $resdirectPhoneNumber : ResdirectPhoneNumber()
>                eval($resdirectPhoneNumber.getType().getId() == 5 &&
>
> $resdirectPhoneNumber.isValidForBrand($croNumberDetailsRequest.getBrand(
> )) &&
>                         $croNumberDetailsRequest.getRegion() != null &&
>
> $resdirectPhoneNumber.isValidRegion($croNumberDetailsRequest.getRegion()
> ) &&
>                         $croNumberDetailsRequest.getLocale() != null &&
>
>
> $resdirectPhoneNumber.isValidForLocaleId($croNumberDetailsRequest.getLoc
> ale()) &&
>
> $resdirectPhoneNumber.isValidSlot($croNumberDetailsRequest.getSlot()));
>
>        then
>                ResultList.add($resdirectPhoneNumber);
> end
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080905/e9fff924/attachment.html 


More information about the rules-users mailing list