Note that the 100% CPU issue with fireUntiHalt is only with the 5.1 version of Drools. In 5.0.x, CPU is close to 0% when there are no rules to fire. I saw this when I was testing upgrading to 5.1.
Norman ----- Original Message ---- From: jschmied <[email protected]> To: [email protected] Sent: Sun, October 24, 2010 4:06:02 AM Subject: Re: [rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage Hi! fireUntilHalt uses one processor with 100%. You have a dualcore, so it's 50%. It's by design like this. You can: - Call fireAllRules after every insert if you have no ruleflow. - Use fireAllRules in a loop with a small sleep and check for the end of the ruleflow in the loop: while (prc.getState() == ProcessInstance.STATE_ACTIVE) { Threads.sleep(20); ksession.fireAllRules(); } with both methods you get a low cpu load. bye juergen -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Starting-engine-using-fireUntilHalt-and-inserting-no-facts-results-in-50-CPU-usage-tp1760370p1761821.html Sent from the Drools - User mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
