Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
5.0.0.FINAL
-
None
Description
We have hit a critical bottleneck in our application as a result of attempting to execute rules on more facts then we have in the past.
I didn't think it was Drools at first but after profiling it is pretty evident that it is.
The callgraph is showing 560s in org.mvel2.integration.impl.ClassImportResolverFactory constructor and 152530 calls.
This also translates into org.mvel2.integration.impl.SimpleValueResolver constructor 18,454,778 calls for my present case.
This is being invoked from the following in CompiledExpression:
public Object getValue(Object staticContext, VariableResolverFactory factory) {
if (!optimized) setupOptimizers();
if (importInjectionRequired)
Where importInjectionRequired is almost always going to be true because of:
public void setParserContext(ParserContext parserContext) {
if ((this.parserContext = parserContext) != null)
}
The parsercontext.imports seems to be always greater then 0 and to make matters worse I'm seeing a new Factory not only being created per rule but for the same rule multiple times.
Attachments
Issue Links
- is related to
-
JBRULES-2067 Compilation performance for rules degrades as the classpath increases
- Closed