I think you should not worry about the CPU % in the first place. If there's nothing<br>else to do, a serf might very well busy himself by -- looking for work ;-)<br><br>More technically, scheduling as it is frequently used in an operating system will<br>
assign the CPU according to a strategy, which "punishes" processes monopolizing<br>the CPU by not doing any I/O. This means that any such process is downgraded<br>in its scheduling priority, whereas "well-behaved" processed will be upgraded<br>
due to their wait times because of I/O.<br><br>Inserting one fact and calling fireAllRules may be a good strategy, but it isn't<br>essential for achieving anything except short reaction time or results not<br>influenced or muddled by other facts. (For the latter, your rules may have to<br>
take precautions!)<br><br>-W<br><br><div class="gmail_quote">On 25 October 2010 18:13, Tina Vießmann <span dir="ltr"><<a href="mailto:tviessmann@stud.hs-bremen.de">tviessmann@stud.hs-bremen.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
> You can call fireAllRules after every event changing the state of the facts<br>
> or of the ruleflow.<br>
So it's not recommended to insert more than one event and then calling<br>
fireAllRules()?!<br>
<br>
> When you do event stream processing and use the time<br>
> inside your rules, the time is a change event too. So you have to use<br>
> fireUntilHalt if you can't afford to have the small pauses using<br>
> fireAllRules/Sleep in a loop.<br>
Currently, I'm using the stream processing mode. But I'm not using<br>
windows, I'm just using temporal operations.<br>
Would you recommend me to use fireAlleRules+Sleep if I want to use<br>
fireAllRules or can I also use it without the sleep?<br>
<br>
Thanks. :)<br>
Tina<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>
</blockquote></div><br>