Yes, you are missing something for sure... :)
Seems your problem is not the rule engine, but your application framework
(or your algorithm)... why are you scanning the whole file if you know
before hand all the possible signatures? Use a text (or binary) search
algorithm and you will get unbeatable performance and will scan the file
Now, if your problem is much more than simply finding a signature (for
instance, actually analyzing and inferring data, or taking actions based on
multiple patterns that maybe inside the file), then we need to look at your
macro algorithm and your rules to understand what is happening.
Sorry, but can't say more without knowing more about your case.
2007/8/9, hare ram <hare.bond(a)gmail.com>:
I have a question regarding the performance of drools. The scenario is
this.I have a huge file. This file is produced by one of the 30 devices we
have in the lab.We have to figure out which of the device produced this
file . Each of the device has a its own "signature line", by which I can
distinguish each of the devices. So, previously what I was doing was,
reading each line in the file,checking if it is the "signature line" for
that device.All this is ordered. So if is my correct device is 30th, I
have to read this huge file 30 times,thus wasting a lot of time
I thought drools might come in handy in this scenario. So I have the
rules, which basically reads a line in the file and asserts into the memory.
Each time a new line is asserted into the memory,the rules for all of the
remaining 30 devices, check if it is its signature line. If so, i have found
out my device and clear the agenda.
But unfortunately i find that parsing the file 30 times id giving me a
better performance then using the drools. Is there something I am missing
rules-dev mailing list
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com