Please send these emails to the user list (in cc) so everyone can help,
not directly to me.
Mark
jayadevan m wrote:
Hi
We have one performance(memory) issue in drools-5
Our Scenario
We have 3 entities
Trip - Entity representing details about trip
Driver - Entity for driver , it contain details about driver
Assignments - details about each assignments (one driver may assigned
to many trip)
The rule is to find ,"Find overlapping between trip assignments"
For Implementing this we take the Trip ,Driver And Assignments
entities from Data base and put it into working memory
For Small number of records this rule work well ,
But we want to check it against 15000 driver ,331176 assignments and
12745 trips
In that case it take huge amount of time for execution (rule firing )
Rule is
rule "Assignment Check"
when
$creVo: DriverAssignVO($drId: driverId ,$tid: tripId);
$tripAssignment: TripVO(
$tpid: tripId,
$startDtmUtc: startDtmUtc,
$endDtmUtc: endDtmUtc)
and
$trvo: TripVO(
tripId != $tpid,
tripId in ($tid),
((startDtmUtc >= $startDtmUtc &&
startDtmUtc <= $endDtmUtc) ||
(endDtmUtc >= $startDtmUtc && endDtmUtc <=
$endDtmUtc)));
$crvo: DriverAssignVO($drvrId: driverId , driverId ==
$drId , tripId != $tid, tripId == $tpid)
then
System.out.println("TRIP ID: " + $crvo.getTripId());
end
thanks and regards