[rules-users] addKnowledgePackages Delay

malkhafaji moe.alkhafaji at medcpu.com
Mon May 3 02:06:58 EDT 2010


Hello,

I am trying to add knowledge packages to an existing KnowledgeBase. My
largest DRL file has 110 rules. I noticed that it may take up to 5 seconds
just to execute the following statement:

this.knowledgeBase.addKnowledgePackages(packages);

where "packages" is just a list of one knowledge package representing one
drl. The nature of my rules is that I initially load a small set of rules
and then at runtime my rules may load other DRLs. The problem is each DRL
loading command (this.knowledgeBase.addKnowledgePackages(packages)) takes a
few seconds and I have no idea why. Although, all those DRLs are already
compiled (at startup time). It is the line I pasted above that takes the
longest time out of anything else I do.

Any idea why just merely adding a KnowledgePackage list to a KnowledgeBase
can take this much time? Do you guys have any suggestions on how I can
reduce this time? I tried to create another dummy KnowledgeBase and get the
KnowledgePackage from it at runtime and add that to my KnowedgeBase above
(thinking that would reduce the time maybe), but not at all.

Any ideas would be great. The API does not have much info on what that add
method exactly does behind the scenes, and how I can get around the long
delays. This is very frustrating to me, and I am not sure where to look.
Thanks for ANY help at all.
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/addKnowledgePackages-Delay-tp772574p772574.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list