probably better ask the user forum, this is dev. Unless this has dev ramifications, which it doesn't (yet).

dev == developing the engine itself (and tools) not so much for writing rules and design of applications ;)

On 3/23/07, Premkumar Stephen <prem18@gmail.com> wrote:
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!

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev