probably better ask the user forum, this is dev. Unless this has dev ramifications, which it doesn&#39;t (yet).<br><br>dev == developing the engine itself (and tools) not so much for writing rules and design of applications ;)
<br><br><div><span class="gmail_quote">On 3/23/07, <b class="gmail_sendername">Premkumar Stephen</b> &lt;<a href="mailto:prem18@gmail.com">prem18@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>Consider that I have 500 instances of interface userI. Now, there are 3000 rules currently written based on a combination of these instances.<br><br><span style="color: rgb(102, 102, 204);">if {</span><br style="color: rgb(102, 102, 204);">


<span style="color: rgb(102, 102, 204);">&nbsp;&nbsp;&nbsp;&nbsp; $a : userI (name = &quot;A&quot;)</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">&nbsp;&nbsp;&nbsp;&nbsp;  $b : userI (name = &quot;B&quot;)</span><br style="color: rgb(102, 102, 204);">


<span style="color: rgb(102, 102, 204);">}</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">then</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">

{
</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">&nbsp;//do some actions</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">}</span><br><br>How many tests are needed for a match in the RETE network for this rule?
<br><br>If I created 500 classes, one for each object, such as UserA implements userI and so on... my rule will look like:<br><br><span style="color: rgb(102, 102, 204);">if {</span><br style="color: rgb(102, 102, 204);">


<span style="color: rgb(102, 102, 204);">&nbsp;&nbsp;&nbsp;&nbsp; $a : UserA()</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
&nbsp;&nbsp;&nbsp;&nbsp;  $b : UserB()</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
}</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
then</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
{</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
&nbsp;//do some actions</span><br style="color: rgb(102, 102, 204);"><span style="color: rgb(102, 102, 204);">
}<br><br><span style="color: rgb(0, 0, 0);">Will this lead to better performance since there will only be one such instance of this object?<br><br>As for class-loading concerns, will there be a parsing/memory penalty to be paid for having 500 classes now instead of one?
<br><br>Thanks!<br style="color: rgb(102, 102, 204);"></span></span>
<br>_______________________________________________<br>rules-dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-dev</a><br><br></blockquote></div><br>