ContextInstance.setVariable() behaves very inperformant
-------------------------------------------------------
Key: JBPM-817
URL:
http://jira.jboss.com/jira/browse/JBPM-817
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.2
Reporter: Mirco Graf
Assigned To: Tom Baeyens
When setting a process variable, jBPM tries to map the variable to a jBPM-internal
data-type (StringVariable, LongVariable etc.). When comparing the given variable-value to
existing jBPM-types, the Class org.jbpm.context.exe.JbpmType always performs an
XML-parsing of the ressource "resource.varmapping" to get all available types
without any caching. The types usually should be cached as the property
"jbpm.types", but it seems like jbpm never uses the cache and always performs an
XML-parsing. In the following method of Class org.jbpm.context.exe.JbpmType the else-case
is *always* executed, seems like the property "jbpm.types" is not set
correctly.
public static List getJbpmTypes() {
List jbpmTypes = null;
if (JbpmConfiguration.Configs.hasObject("jbpm.types")) {
jbpmTypes = (List) JbpmConfiguration.Configs.getObject("jbpm.types");
} else {
jbpmTypes = getDefaultJbpmTypes();
}
return jbpmTypes;
}
While profiling my app i realized that getJbpmTypes()-Operations took about 30% of the
whole application-runtime, about 15ms in average.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira