<br>   Thinking a bit more about it, if the rules author does not care about a given event type, he will probably not even declare that event type with @role( event ), meaning the engine will not discard it automatically. By default the engine will keep this facts around until retracted because at some point in the future the user might dynamically add rules that match them, what is clearly not your case...<br>
<br>    So, for your problem, I believe pre-filtering is probably your best option with released versions of Drools. For future versions, I think we should add a kbase configuration option to tell the engine what to do in case of facts that don&#39;t match any rule: either keep them (as it does today) or discard them right away. What do you think?<br>
<br>    Edson<br><br><div class="gmail_quote">2009/11/24 Barry Kaplan <span dir="ltr">&lt;<a href="mailto:groups1@memelet.com">groups1@memelet.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Greg, I&#39;m not following how this is related to my question. Probably I was<br>
unclear.<br>
<br>
Suppose I have 1000 event types/classes, but rules that use only 50 types in<br>
LHS patterns. I will be receiving events of random types at say 100hz. The<br>
question is whether I should just insert the events regardless of whether<br>
any rule actually uses the instances&#39; event type (because the rete-oo will<br>
filter out the unused types very quickly) or whether I should add a filter<br>
before sesssion.insert(..) to let only those types of events that are<br>
actually used by a rule.<br>
<br>
My second problem/question then becomes: How to determine which<br>
types/classes are actually used in LHS patterns for a given package? By this<br>
I mean, how can I write code to make this determination.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26505340.html" target="_blank">http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26505340.html</a><br>

</font><div><div></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>