(OT: your nick &quot;me&quot; is confusing other gmail users. I see your mail as if I had sent it to myself. I was almost binning it.)<br><br>The delay you see may depend on the way you run the test with 40K events. Please describe the sequence of insertions and calls to fire...(), the session setup (pseudo-clock, etc.)<br>
<br>-W<br><br><br><div class="gmail_quote">2010/12/23 me <span dir="ltr">&lt;<a href="mailto:radai.rosenblatt@gmail.com">radai.rosenblatt@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi.<br><br>im trying to demo drools-fusion for a system that processes backup events. <br>i have the following 2 CEP rules:<br><br>rule &quot;Backup Not Succeeded For At Least 3 Days&quot;<br>@ruleId(1)<br>when<br>    Node($id : id)<br>


    not ( Backup(clientId == $id, $state: state == BackupStateEnum.FINISHED) over window:time( 3d ) from entry-point &quot;Backup Stream&quot; )<br>then<br>    //nothing for now<br>end<br><br>rule &quot;Prune Previous Successful Backups&quot;<br>


@ruleId(2)<br>when<br>    $prevBackup  : Backup($id : clientId,  state == BackupStateEnum.FINISHED) from entry-point &quot;Backup Stream&quot;<br>    $newerBackup : Backup(clientId == $id, state == BackupStateEnum.FINISHED, this after $prevBackup) from entry-point &quot;Backup Stream&quot;<br>


then<br>    drools.retract($prevBackup);<br>end<br><br>rule #2 is my attempt to cut down on memory usage. the problem is that rule #2 slows down the processing very very considerably (2 orders of magnitude slower when simulating batches of 40K events/day).<br>


<br>what would be my next step in trying to find the reason for it? my intuition tells me that with 2 events in the system at any given time instead of 120K (single node, 40K events/day 3 day window) i should have seen either a speedup or reduced memory consumption (if not both) and yet the results im seeing are the exact opposite.<br>


is there anything im missing ? i could try adding some sort of LastSuccessfulBackup &quot;marker&quot; object into main memory and updating it using events from the backup stream, but then how would i express rule #1 ?<br>


<br>any help/clues/suggestions would be greatly appreciated,<br><br>   radai.<br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>