Michael,

  Yes it is. But I'd tried separate 'em but when I load 'em into one
  RuleBase I have the same memory problem.

  Here is the code I use to load:


  for (... each resource with the ruleset ... ){
          ConflictResolver resolver = SalienceConflictResolver.getInstance();
          RuleBase aRuleBase = null;
          aRuleBase = RuleBaseLoader.loadFromUrl(resource, resolver);
          resolver = null;
          resource = null;
          for (Iterator j = aRuleBase.getRuleSets().iterator();j.hasNext();) {
              RuleSet ruleSet = (RuleSet) j.next();
              builder.addRuleSet(ruleSet);
          }
          aRuleBase = null;
          ruleSetUrl = null;
 }
 RuleBase rb = builder.build();
 builder = null;

 

 Maybe this is not the best way to do it.... The very big problem is I
 realy need it to be just one RuleBase at the end.

 

Thursday, April 6, 2006, 8:01:17 PM, you wrote:

> Is it all one big ruleset?

> On 4/7/06, Felipe Piccolini <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>>   Im still using drools 2.x for my project (I cnt switch right now)
>>   and I have memory problems because I have a very large ruleset file
>>   (about 2.8Mb xml file, near 500 rules). Its a very complex ruleset,
>>   several conditions on each rule and the facts are complex objects
>>   too.
>>
>>   I'v been trying to separate the file in several files, loading each
>>   one in a ruleBase and the extracting all the rulesets from each
>>   rulebase into a one rulebase with the RuleBaseBuilder. This is
>>   because I need all the rules in one RuleBase. The problem is when Im
>>   loading the rules (RuleBaseLoader.loadFromUrl) I can see how the
>>   memory used goes up linearly, crashing after some seconds in
>>   OutOfMemory.
>>
>>   Can anyone tellme what to check in my rules to get the memory use at
>>   load go down??. Is there any way in the load of rules to avoid the
>>   massive use of memory?, I dont know if is the XML parsing, or is the
>>   build, but I realy need to load all those rules into one RuleBase.
>>
>>   Thanks.
>>
>>
>> ----------------------
>> Felipe Piccolini
>> BlueSoft Ingenieros Asociados
>> (562) 688 3083
>> [EMAIL PROTECTED]
>>
>>


--------------------------
Felipe Piccolini
[EMAIL PROTECTED]

Reply via email to