Madhan
Madhan

Reputation: 51

Rules engine has slow down or takes longer to compile while firing rules [Drools]

I've a separate Java spring boot service as a rules engine. Which has controller and service to set focus on agenda groups as user or other service preferred. In my case i have 500 plus rules and 30 plus agenda groups. While i trigger the particular agenda groups it starts compile at the first trigger, afterwards it don't take time. When i keep on adding it takes time to first compile. Following things I'm suspecting: Please add on your thoughts.

  1. I'm using for loops when i need to iterate over list of objects.
  2. Larger number of rules.
  3. Must be some problem with configurations.

Please share your thoughts. if you need any more input i can provide.

I didn't change anything yet. I just think to take some rules to another drools service. I want to make it faster or it should compile along with build.

Upvotes: 1

Views: 302

Answers (1)

Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20976

  1. The less computation in when block the better, see this
  2. Some performance investigation around session with 10K rules here
  3. Rules compilation takes much time, but you can configure drools to precompile them, see this

Upvotes: 1

Related Questions