[rules-users] Starting engine using fireUntilHalt and inserting no facts results in 50% CPU usage

Tina Vießmann tviessmann at stud.hs-bremen.de
Sun Oct 24 11:40:46 EDT 2010


Thank you, Jürgen.

> fireUntilHalt uses one processor with 100%. You have a dualcore, so it's
> 50%. It's by design like this.

Where can I find more techincal/performance specification about drools?

> 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.
I'm permanently receiving packages of facts to be insert. Is it also 
possible call fireAllRules after inserting the facts of a package?

Thank you! :)
Tina



More information about the rules-users mailing list