<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hi Mauracio!</div>
<div><br>
</div>
<div>THANK YOU!</div>
<div><br>
</div>
<div>I tried the following and things just lit up!</div>
<div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><font class="Apple-style-span" face="Calibri,sans-serif" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br>
</span></font></span></font></div>
<div>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">rule "<span style="text-decoration: underline">Binning</span> for Attribute: Device_type_desc"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"> when</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"> $call : BINNING_INPUT( device_type_desc != null )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"> $device_typeLookup : LU_DEVICE_TYPE( $call.device_type == device_type )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"> then</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"> $call.setDevice_type_desc($device_typeLookup.getDevice_type_desc());</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco">end</p>
</div>
<div><br>
</div>
<div>Why does the "guard" on the BINNING_INPUT result in such a speedup? Is the fact being processed by the same rule over and over again? Do I need to wrap my $call.setDevice_type_desc(...) call in a modify block?</div>
<div><br>
</div>
<div>Dave</div>
<div><br>
</div>
<div>On 12/19/11 8:31 AM, "Mauricio Salatino" <<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>> wrote:</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>If you can write a more restrictive rules, you will be able to not</div>
<div>generate that 10kx10k matrix.</div>
<div>If you activate the log you will see 10kx10k activations that I'm sure</div>
<div>that it's causing the delay.</div>
<div>Can you write a more restrictive rule?</div>
<div><br>
</div>
<div>I'm not sure to understand this join -> $call.device_type == device_type</div>
<div>device_type is a constant? or is something that you get from another Pattern?</div>
<div><br>
</div>
<div>Cheers</div>
<div><br>
</div>
<div>2011/12/19 David Martin <<a href="mailto:david.martin@mercedsystems.com">david.martin@mercedsystems.com</a>>:</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>Folks:</div>
<div><br>
</div>
<div>My co-workers and I have been using Drools to great success, but we ran</div>
<div>smack into a performance brick wall recently.</div>
<div><br>
</div>
<div>In the example below, both BINNING_INPUT and LU_DEVICE_TYPE have large</div>
<div>numbers of associated facts in working memory (BINNING_INPUT has more than 8</div>
<div>million facts in working memory, LU_DEVICE_TYPE about 10k.)</div>
<div><br>
</div>
<div>LU_DEVICE_TYPE models a lookup table.</div>
<div><br>
</div>
<div>rule "Binning for Attribute: Device_type_desc"</div>
<div> when</div>
<div> $call :</div>
<div> BINNING_INPUT()</div>
<div> $device_typeLookup :</div>
<div> LU_DEVICE_TYPE(</div>
<div> $call.device_type == device_type</div>
<div> )</div>
<div><br>
</div>
<div> then</div>
<div> $call.setDevice_type_desc($device_typeLookup.getDevice_type_desc());</div>
<div>end</div>
<div><br>
</div>
<div>It's a simple enough rule: join on the device_type field. Unfortunately,</div>
<div>this rule and a few others like it are taking FOREVER to insert. Even when</div>
<div>I cut the number of BINNING_INPUT facts in working memory down from 8M to</div>
<div>10k.</div>
<div><br>
</div>
<div>This feels like a basic Drools question. But I can't seem to find any help</div>
<div>from google.</div>
<div><br>
</div>
<div>Please advise!</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div><br>
</div>
<div>Dave Martin</div>
<div><br>
</div>
<div><br>
</div>
<div>_______________________________________________</div>
<div>rules-users mailing list</div>
<div><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></div>
<div><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></div>
<div><br>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>-- </div>
<div> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a></div>
<div> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></div>
<div> - Co-Founder @ <a href="http://www.jugargentina.org">http://www.jugargentina.org</a></div>
<div> - Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></div>
<div><br>
</div>
<div> - Salatino "Salaboy" Mauricio -</div>
<div><br>
</div>
<div>_______________________________________________</div>
<div>rules-users mailing list</div>
<div><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></div>
<div><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></div>
<div><br>
</div>
</blockquote>
</body>
</html>