title: how to improve drools rules performance
body: <p>I have some 50 rule files which am generating from xsl files.
    In each drl file I have around 500 rules each. Each rule is like to find string which contains, starts or ends with some given string.
  Currently we have only one knowledgeBase where all the rules has been loaded.
  Currently running rules is a performance hit for us, its taking majority of our execution time. There will be a thousands of requests will be hitting a service per second a small amount performance improvement will benefit us.
  Is there any way to increase the performance.
  The one way I was thinking was to create different knowledgeBase for each set of rules and call them. Is this a right way of doing it or do we have any other best way of optimizing the rules.</p>
  
  <p>Rule example:</p>
  
  <pre><code>rule "StampingRules_26"
  salience 200000
  when
      $map : Map(UTILITY.supportsDirectoryType($map,'PCM'),
                 UTILITY.supportsDirectory($map,'CMMSCPE'),
                 ! UTILITY.exitAllRules($map),
                 ! executed,
                 UTILITY.applicable($map,'resellerName'),
                 UTILITY.setRuleLevel($map,'resellerCountry'),
                 UTILITY.checkRuleLevel($map,'US'),
                 UTILITY.startsWith ($map, 'Advent System~~AdventSystem'))
  then
      ((Map)$map.get('PARAMETERS')).put('replaceParameter','csd_id'); 
       String replaceParameter='csd_id';
      ((Map)$map.get('PARAMETERS')).put(replaceParameter, '001d000001Fsm72AAB');
      ((RulesUtility)$map.get('UTILITY')).setExitAllRules($map,'yes');
  end
  </code></pre>
  
  <p>thanks in advance  </p>