[rules-users] Re: Independent rule evaluations

Yuri ydewit at gmail.com
Tue Aug 14 15:54:03 EDT 2007


Dr. Gernot Starke <gs <at> gernotstarke.de> writes:
> can you detail your problem a little?

I basically need to find perfect matches between two different sets of objects.
If perfect matches are not found, I then create bulks of objects that are then
used in combination with the individual ones to find bulk matches. If no matches
are found I need then to categorize the breaks (around 10 different
categorizations) and report them.

The matching criteria between two object is specific enough to be fast. Once I
get into break, which basically is removing some criteria components, the
possible combinations increase exponentially. Bulking just compounds the problem
by adding more matchable/breakable facts into memory. 

My bulking logic (I didnt have collect when I started with 3.0) starts a bulk
looking for two diff objects with the same bulkling criteria (this is my first
potential cross product since drools would produce C!/N!(C-N)! combinations).
Then once the bulk for a given criteria is create I have a second rule that
expands or contracts the bulks as new facts are asserted causing many different
side effects.

What I am basically seeing is that asserting a fact that would for instance be a
perfect match, causes many of the bulking and breaking rule activations to be
created and then cancelled. Considering that I am talking about tens or hundreds
of thousands of facts I thought that if I could stage the activation creations I
would increase processing speed.

With 15K objects on each side I have been seeing something like 1 assertion per
second.

I am aware that this could be cross product somewhere but I have already revised
the rules many many times so now I am looking for other alternatives.

I am now trying to understand looking I basically need to find perfect matches
between two different sets of objects. If perfect matches are not found, I then
create bulks of objects that are then used in combination with the individual
one to find bulk matches. If no matches are found I need then to categorize the
breaks (around 10 different categorizations) and report them.





More information about the rules-users mailing list