[jboss-jira] [JBoss JIRA] Created: (JBRULES-2477) Time spent in org.mvel2.integration.impl.ClassImportResolverFactory constructor causing transaction timeouts
Sam Doyle (JIRA)
jira-events at lists.jboss.org
Fri Apr 9 23:05:38 EDT 2010
Time spent in org.mvel2.integration.impl.ClassImportResolverFactory constructor causing transaction timeouts
------------------------------------------------------------------------------------------------------------
Key: JBRULES-2477
URL: https://jira.jboss.org/jira/browse/JBRULES-2477
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.0.FINAL
Reporter: Sam Doyle
Assignee: Mark Proctor
Priority: Critical
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:
{code}
public Object getValue(Object staticContext, VariableResolverFactory factory) {
if (!optimized) setupOptimizers();
if (importInjectionRequired) {
return execute(false, this, staticContext, new ClassImportResolverFactory(parserContext.getParserConfiguration(), factory));
}
{code}
Where importInjectionRequired is almost always going to be true because of:
{code}
public void setParserContext(ParserContext parserContext) {
if ((this.parserContext = parserContext) != null) {
this.importInjectionRequired =
parserContext.getImports() != null && parserContext.getImports().size() != 0;
}
}
{code}
The parsercontext.imports seams 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list