Does Drools Salience Have Performance Impacts? -


for example, if have 1 million fact objects, going through set of rules, execution order of rules irrelevant. there performance difference between:

  1. explicitly assign different salience values each rule
  2. use default salience value (0) or rules same salience value?

just curiosity, because heard latter 1 performs better.


i did benchmarking myself. result shows different salience approach have overhead, , increases total processing time (not though), time spent on fact object processing seems same.

not sure if observation meets underlying code logic.

i should thank both detailed explanation.

for drools 6. each rule match (also called activation or rule instantiation) given rule added bidirectional linked list. firing rule matter of iterating list, firing each rule in turn.

each rule evaluate placed on binaryheapqueue , rules popped in turn, evaluated, linked list produced, , iterated attempt firing.

if there large number of rule matches, per rule, cost of heap queue not noticeable. if have low number of rule matches per rule, large number of rules, you'll see 10% (this guess) or overhead in comparison.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -