<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>I have a list of very similar rules executed in Drools and some performance problems appear ... I want some advices to choose between two &quot;direction&quot; in order to correct them ...<br>

<br></div>First the context :<br></div>I have to execute always the same check but with different level or &quot;parameters&quot;. <br>For example, <br>- in the first demand (rule for our client) i have to count and retrieve the list all Article that have a family code equals to &#39;A&#39;, &#39;B&#39; or &#39;C&#39; and execute the then clause only if there is 3 elements in the filtered list. <br>

- in the second demand (rule for our client) i have to count and retrieve 
the list all Article that have a family code equals to &#39;B&#39; or &#39;C&#39; 
and execute the then clause only if there is 4 elements in the filtered 
list<br></div>and so on ...<br><br></div><div>The number of different group of parameter values and the values of theses parameters will change over time ...<br></div><div><br></div>The question is : is it more efficient to implement a lot of different rules, each with their parameter in the code OR is it more efficient to implement only one rule with an additional object as a drools fact containing different parameter&#39;s values ?<br>

<br></div>Thanks for your help <br></div>Sébastien<br><div><div><div><div> <br></div></div></div></div></div>