[rules-dev] Which of these scenarios will lead to better performance?
Premkumar Stephen
prem18 at gmail.com
Thu Mar 22 19:41:07 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-dev/attachments/20070322/fbd24120/attachment.html
More information about the rules-dev
mailing list