I've been analyzing the performance of a little side project I'm doing with
drools, and I've noticed that mvel churns through a huge number of HashMap creations
when evaluating expressions. The main problem is in the
org.mvel2.integration.impl.ClassImportResolverFactory constructor, which is called every
time org.drools.base.mvel.MVELPredicateExpression.evaluate() is called. (Which is, of
course, a LOT.) In my case I'm seeing the vast majority of activity in
org.drools.rule.PredicateConstraint.isAllowedCachedRight(), so maybe this is something
controllable by changing a rule, but I'm not sure. I've watched literally
gigabytes per second of HashMap.Entry objects being created. Is there some way around
this? I know this may be a better question for the mvel dev list, but I wanted to bring
it to your attention.