Can someone help me understand the relationship between the number of Packages in a single RuleBase and PermGen memory consumption? I have a test that generates  200 rules and then adds those rules as different packages to a single rule base. PermGen consumption grows near linearly with the addition of Packages to the rule base and on a default PermGen setting the JVM runs out of PermGen after about 120 packages.

 

Is every new Package and RuleBase backed by a set of generated Classes? Is there a way to get around the amount of class generation that is taking place?

The test has been run against Drools 5.

 

Thank you for your help,

Joe