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...
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't match any rule: either keep them (as it does today)
or discard them right away. What do you think?
Edson
2009/11/24 Barry Kaplan <groups1(a)memelet.com>
Greg, I'm not following how this is related to my question. Probably I was
unclear.
Suppose I have 1000 event types/classes, but rules that use only 50 types
in
LHS patterns. I will be receiving events of random types at say 100hz. The
question is whether I should just insert the events regardless of whether
any rule actually uses the instances' event type (because the rete-oo will
filter out the unused types very quickly) or whether I should add a filter
before sesssion.insert(..) to let only those types of events that are
actually used by a rule.
My second problem/question then becomes: How to determine which
types/classes are actually used in LHS patterns for a given package? By
this
I mean, how can I write code to make this determination.
--
View this message in context:
http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or....
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com