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!