[
https://jira.jboss.org/browse/JBRULES-2477?page=com.atlassian.jira.plugin...
]
Edson Tirelli commented on JBRULES-2477:
----------------------------------------
Sam, can you test your use case using latest Drools [1] and let us know if you still see
the bottleneck? Back in April I fixed JBRULES-2067 [2] by creating a class resolution
cache to avoid searching the classpath over and over for all necessary classes. There is
also a configuration to enable/disable this cache, as per comments in that ticket.
I will close this issue for now, as I am assuming that will fix your problem. If it is not
the case, please re-open it and let me know. In that case we will probably have to submit
a ticket to MVEL to fix this in MVEL code, but I will follow up with Mike to get this
released soon in MVEL.
[1]
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/tr...
[2]
https://jira.jboss.org/browse/JBRULES-2067
Thanks,
Edson
Time spent in org.mvel2.integration.impl.ClassImportResolverFactory
constructor causing transaction timeouts
------------------------------------------------------------------------------------------------------------
Key: JBRULES-2477
URL:
https://jira.jboss.org/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: Edson Tirelli
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:
public Object getValue(Object staticContext, VariableResolverFactory factory) {
if (!optimized) setupOptimizers();
if (importInjectionRequired) {
return execute(false, this, staticContext, new
ClassImportResolverFactory(parserContext.getParserConfiguration(), factory));
}
Where importInjectionRequired is almost always going to be true because of:
public void setParserContext(ParserContext parserContext) {
if ((this.parserContext = parserContext) != null) {
this.importInjectionRequired =
parserContext.getImports() != null &&
parserContext.getImports().size() != 0;
}
}
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira