<html><body bgcolor="#FFFFFF"><div>Thanks for the reply. But I don't understand what you mean by caching the KnowledgeBase. This is about adding a pre compiled KnowledgePackage to a KnowledgeBase. So, how does caching a KnowledgeBase makes addition of new KnowledgePackage faster? Please excuse my ignorance if I am not catching what you are suggesting. Maybe a couple of lines of code to demonstrate your suggestion would be greatly appreciated. Thanks.&nbsp;<br><br>Sent from my iPhone</div><div><br>On May 3, 2010, at 1:24 AM, Rajnikant Gupta &lt;<a href="mailto:capricorn.raj@gmail.com">capricorn.raj@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><div>Hi,</div>
<div>&nbsp;</div>
<div>Yes, adding packages to knowledgeBase does take some time. You&nbsp;can probably try caching your knowledgeBase. By&nbsp;doing this all, but first, requests&nbsp;should be significantly fast.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br clear="all">Regards,<br><br>Rajnikant Gupta<br><br><a href="http://rkthinks.wordpress.com/"><a href="http://rkthinks.wordpress.com/">http://rkthinks.wordpress.com/</a></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"><a href="mailto:moe.alkhafaji@medcpu.com">moe.alkhafaji@medcpu.com</a></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 "packages" 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"><a href="http://drools-java-rules-engine.46999.n3.nabble.com/addKnowledgePackages-Delay-tp772574p772574.html">http://drools-java-rules-engine.46999.n3.nabble.com/addKnowledgePackages-Delay-tp772574p772574.html</a></a><br>
Sent from the Drools - User mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></a><br></font></blockquote></div><br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></span><br></div></blockquote></body></html>