<div>Hi,</div>
<div> </div>
<div>Yes, adding packages to knowledgeBase does take some time. You can probably try caching your knowledgeBase. By doing this all, but first, requests should be significantly fast.</div>
<div> </div>
<div> </div>
<div> </div>
<div><br clear="all">Regards,<br><br>Rajnikant Gupta<br><br><a href="http://rkthinks.wordpress.com/">http://rkthinks.wordpress.com/</a><br><br><br></div>
<div class="gmail_quote">On Mon, May 3, 2010 at 11:36 AM, malkhafaji <span dir="ltr">&lt;<a href="mailto:moe.alkhafaji@medcpu.com">moe.alkhafaji@medcpu.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hello,<br><br>I am trying to add knowledge packages to an existing KnowledgeBase. My<br>largest DRL file has 110 rules. I noticed that it may take up to 5 seconds<br>
just to execute the following statement:<br><br>this.knowledgeBase.addKnowledgePackages(packages);<br><br>where &quot;packages&quot; is just a list of one knowledge package representing one<br>drl. The nature of my rules is that I initially load a small set of rules<br>
and then at runtime my rules may load other DRLs. The problem is each DRL<br>loading command (this.knowledgeBase.addKnowledgePackages(packages)) takes a<br>few seconds and I have no idea why. Although, all those DRLs are already<br>
compiled (at startup time). It is the line I pasted above that takes the<br>longest time out of anything else I do.<br><br>Any idea why just merely adding a KnowledgePackage list to a KnowledgeBase<br>can take this much time? Do you guys have any suggestions on how I can<br>
reduce this time? I tried to create another dummy KnowledgeBase and get the<br>KnowledgePackage from it at runtime and add that to my KnowedgeBase above<br>(thinking that would reduce the time maybe), but not at all.<br><br>
Any ideas would be great. The API does not have much info on what that add<br>method exactly does behind the scenes, and how I can get around the long<br>delays. This is very frustrating to me, and I am not sure where to look.<br>
Thanks for ANY help at all.<br><font color="#888888">--<br>View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/addKnowledgePackages-Delay-tp772574p772574.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/addKnowledgePackages-Delay-tp772574p772574.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></font></blockquote></div><br>