As the facts propagate through the Rete network, another optimization technique is to index fact values. We can then evaluate each test more quickly.
When a fact meets the constraints specified by a node, it is propagated to all of its descending child nodes. This usually means iterating over all of the child nodes and propagating the fact. This takes some time, especially if there are many child nodes. Luckily, we can index
AlphaNode with 'equals' constraints (literal constraints) to be more specific. By default, Drools creates an index (a hash table) if we are testing a property for more than three different values. The object is propagated only to nodes, where it makes sense (the test will succeed). ...