Re: [rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Wolfgang Laun
And, I hope, it doesn't matter in which order the Events A with id x are matched with Events B with the same id. The idea of my approach is to make the Events A, B, C not directly visible to the rule ABC but through a "filter" fact, one per type (A, B. C) and per id. Here is the abstract base cl

Re: [rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Roess. Oliver
Hello again! Thanks for the heads up, Wolfgang. Basically, what I try to create is some sort of batch window, which is not really implemented into Drools Fusion if I remember correctly. It doesn't HAVE to be A, B, C in that particular order which I specified in my last post, but the rul

Re: [rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Wolfgang Laun
Do you mean that insert ("send") Y times A inserts Y times Aevent with the very same id?! If so, you will have to reconsider your approach because you are creating the worst possible scenario for the Rete algorithm, i.e., O(n^3) cartesian tuples for your activations. There are strategies for coun

Re: [rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Roess. Oliver
Hello again. Thanks for your test Wolfgang. When I do it like you did, I get approx. the same results. But you misunderstood my scenario. I don't want to send ABC x times. Here's what I meant in pseudocode. for ( i = 0; i < X; i++) Send Y times A Send Y times B

Re: [rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Wolfgang Laun
What and how are you timing? Executing exactly this rule on three event types with just an int id, running with long t0 = System.currentTimeMillis(); int count = 50; for( int i = 1; i < count; i++ ){ session.insert( new EventA( i ) ); session.insert( new Even

[rules-users] Drools STREAM Mode performance with rather simple rule

2010-11-15 Thread Roess. Oliver
Hello everyone. I've got a question regarding the performance of Drools in STREAM mode. It seems to me, that either Drools is not very fast here, or the problem is with the rule itself. This is the rule. rule "ABC" no-loop when $a : A