<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Patricia,</div><div><br></div><div>My understanding (which is certainly open to being corrected) is that in general there is no way to do an incremental compilation of rules. The entire package is analyzed together and significant optimizations are performed to combine common items between rules (which is one of the big reasons why the engine executes so well!). So, generally, what you are doing is the &quot;best practice&quot;.&nbsp;</div><div><br></div><div>When you say that you are experiencing a performance hit, are you talking about a delay in seeing the updates appear in your production application, or something else? Generally, the compilation is a one-time step, and even during compilation your enterprise application that is actually using the rules should continue to perform quite reasonably, since the compilation is going on in a separate application.&nbsp;</div><div><br></div><div>David</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Patricia Bogoevici &lt;<a href="mailto:patriciabogoevici@yahoo.com">patriciabogoevici@yahoo.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br><span style="font-weight:bold">Date: </span> Tue, 19 Apr 2011 10:45:59 -0500<br><span style="font-weight:bold">To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br><span style="font-weight:bold">Subject: </span> [rules-users] Drools-Guvnor – question about build and deploy packages<br></div><div><br></div><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><br><p style="margin-bottom: 0cm">I am using Drools-Guvnor 5.1 release in
an enterprise application. The rules created are separated per
packages, and for each package there is a snapshot package called
LATEST. The KnowledgeAgent polls the snapshot packages
to get the latest data and load into the rule engine.&nbsp;Whenever there is a new rule, or
updates to an existing one, the application triggers the process of
re-creating the package snapshot: builds all the rules within the
package, and creates a new snapshot for the package.</p><p style="margin-bottom: 0cm"><br></p><p style="margin-bottom: 0cm">The main problem with this approach is
that the time to build the package rules, increases quite a lot as
the number if rules gets higher. This creates a serious performance
hit in the real-time app whenever there is a change to the rules.</p><p style="margin-bottom: 0cm"><br></p><p style="margin-bottom: 0cm">I sneaked a bit to the source code, and
noticed that when build package is called, Guvnor builds a new binary for all the rules within a
package even though not all of them are modified. Would it be possible to incrementally create/update the package binary? This would speed up
things a lot when the package has lots of rules but only one rule
changes at the time.</p><p style="margin-bottom: 0cm"><br></p><p style="margin-bottom: 0cm">What is the best approach for creating
the package snapshots? The approach we've taken is to build all the
rules within a package into one snapshot, and we ran into this performance issue. 
</p><p style="margin-bottom: 0cm"><br></p><p style="margin-bottom: 0cm">Any ideas/suggestions is much
appreciated.</p><p style="margin-bottom: 0cm"><br></p><p style="margin-bottom: 0cm">Thanks,</p><p style="margin-bottom: 0cm">Patricia</p></td></tr></tbody></table></span></body></html>