[rules-users] Will the alternative lead to a better performance?

Premkumar Stephen prem18 at gmail.com
Fri Mar 23 14:10:42 EDT 2007


Hi,

Consider that I have 500 instances of interface userI. Now, there are 3000
rules currently written based on a combination of these instances.

if {
     $a : userI (name = "A")
     $b : userI (name = "B")
}
then
{
 //do some actions
}

How many tests are needed for a match in the RETE network for this rule?

If I created 500 classes, one for each object, such as UserA implements
userI and so on... my rule will look like:

if {
     $a : UserA()
     $b : UserB()
}
then
{
 //do some actions
}

Will this lead to better performance since there will only be one such
instance of this object?

As for class-loading concerns, will there be a parsing/memory penalty to be
paid for having 500 classes now instead of one?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070323/a605c61d/attachment.html 


More information about the rules-users mailing list