The rule you have shown suggests that many of your rules (if not all)
compare fact fields with literals. If there are groups of rules where just
these literals vary, and the corresponding RHS logic is also uniform (just
varying with the values stored or written or whatever), then you might
consider reducing the number of rules - perhaps even considerably - by
putting those sets of literals into Parameter facts and perform the match
with a considerably smaller set of generic rules, one per such a group.
-W
2011/4/26 Mark Proctor <mproctor(a)codehaus.org>
There is no out of the box way to improve that, beyond just
partitioning
your rulebases yourself.
If you would like to get involved in R&D we can do lazy network building
and try pushing unused parts of the rule network to disk.
Mark
On 26/04/2011 12:05, Shebs, Liron wrote:
Hello All,
I’m working at HP Software R&D and we are considering using drools in our
product.
Benchmarking tests showed that running 10,000 rules consumes 382mb.
This is too high for our system requirements, and we would like to know how
we can improve it.
Technical details:
- Drools version: 5.1 with default configuration.
- All rules look like this:
rule "status-Fixed-Open"
when
event : FieldChangedEvent(fieldName ==
"status", oldValue == "Fixed");
entity : Entity(entityType == "mock-entity");
eval(((String)
entity.getFieldValue("status")).equals("Open"));
then
do Something…
end
- Loading code:
KnowledgeBuilder knowledgeBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
for(all resources)
{
knowledgeBuilder.add(resource, ResourceType.DRL);
}
knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());
Any insights are most appreciated.
Thank You,
Liron, HP Software R&D
_______________________________________________
rules-users mailing
listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users