<div dir="ltr"><div>More efficient w.r;t runtime ! <br><br>Actually, we generate (automatically by a batch) one rule for each demand (set of parameters), even if the demand use the same &quot;template&quot; than an other previous demand with other parameters, so code in rules seams to be very duplicated code at the exeption of parameters values ... <br>

<br>For efficiency at runtime (in term of response time), we want to know if &quot;code only one rule (with the parameter as a fact in when clause) and <b>not </b>generate different rules for different parameters&quot; will be more efficient or not ?<br>

<br></div><div>Regards<br></div><div>Sébastien<br></div><div>
<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-21 18:08 GMT+01:00 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&quot;More efficient&quot; w.r.t. runtime, maintenance, development effort,...?<br>
<br>
Writing individual rules is quick, bad for maintenance, and probably<br>
best, if a session has only a few inputs as it starts fast from a<br>
precompiled rule base.<br>
<br>
Parameter facts take a little time for development, are very good for<br>
maintenance (see below) and have a tolerable overhead if they are not<br>
too numerous and/or the session runs long.<br>
<br>
What should be considered is that a set of parameter facts can be<br>
maintained by non-technical personnel, e.g., in a spreadsheet or in<br>
some other data preparation tool. This could be a boon for long-ter<br>
maintenance.<br>
<br>
-W<br>
<div><div class="h5"><br>
<br>
On 21/03/2014, Seb Geek &lt;<a href="mailto:geekseb@gmail.com">geekseb@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have a list of very similar rules executed in Drools and some performance<br>
&gt; problems appear ... I want some advices to choose between two &quot;direction&quot;<br>
&gt; in order to correct them ...<br>
&gt;<br>
&gt; First the context :<br>
&gt; I have to execute always the same check but with different level or<br>
&gt; &quot;parameters&quot;.<br>
&gt; For example,<br>
&gt; - in the first demand (rule for our client) i have to count and retrieve<br>
&gt; the list all Article that have a family code equals to &#39;A&#39;, &#39;B&#39; or &#39;C&#39; and<br>
&gt; execute the then clause only if there is 3 elements in the filtered list.<br>
&gt; - in the second demand (rule for our client) i have to count and retrieve<br>
&gt; the list all Article that have a family code equals to &#39;B&#39; or &#39;C&#39; and<br>
&gt; execute the then clause only if there is 4 elements in the filtered list<br>
&gt; and so on ...<br>
&gt;<br>
&gt; The number of different group of parameter values and the values of theses<br>
&gt; parameters will change over time ...<br>
&gt;<br>
&gt; The question is : is it more efficient to implement a lot of different<br>
&gt; rules, each with their parameter in the code OR is it more efficient to<br>
&gt; implement only one rule with an additional object as a drools fact<br>
&gt; containing different parameter&#39;s values ?<br>
&gt;<br>
&gt; Thanks for your help<br>
&gt; Sébastien<br>
&gt;<br>
<br>
</div></div>_______________________________________________<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></div>