[rules-users] Strange Performance Problem in Rules
ravibhatt
ravi at qubitdigital.com
Tue Oct 19 08:23:45 EDT 2010
Hi Wolfgang Laun-2,
i continue to have problems with performance of this rule.
I made few more observations:
if i write the rule like this (notice hardcoded tbale name in input source
comparision), it runs fast.
$project:Project(status==Status.DATA_FETCHED)
$rule:Rule(name=="somerulename")
$processResult1:ProcessResult(projectId == $project.projectId
,inputSource == "table1",outputTable=="" )
$processResult2:ProcessResult(projectId == $project.projectId
,inputSource == "table2"
,inputSource != $processResult1.inputSource,outputTable=="")
$processData1:ProcessData(parent==$processResult1)
$processData2:ProcessData(parent==$processResult2
,eval($processData2.getValue(SomeEnum.toString())
.equals($processData1.getValue(
SomeEnum.toString())))
,eval($processData2.getValue(SomeEnum.toString())
.equals($processData1.getValue(
SomeEnum.toString())))
)
Now if i write my rule like this, it becomes dead slow.
$project:Project(status==Status.DATA_FETCHED)
$rule:Rule(name=="somerulename")
$processResult1:ProcessResult(projectId == $project.projectId
,inputSource == $rule.inputSource,outputTable=="" )
$processResult2:ProcessResult(projectId == $project.projectId
,inputSource == $rule.inputSource
,inputSource != $processResult1.inputSource,outputTable=="")
$processData1:ProcessData(parent==$processResult1)
$processData2:ProcessData(parent==$processResult2
,eval($processData2.getValue(SomeEnum.toString())
.equals($processData1.getValue(
SomeEnum.toString())))
,eval($processData2.getValue(SomeEnum.toString())
.equals($processData1.getValue(
SomeEnum.toString())))
)
Can anyone please help me here?
Thanks!
Ravi
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Strange-Performance-Problem-in-Rules-tp1728527p1731893.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list