[jboss-jira] [JBoss JIRA] Commented: (JBPM-817) ContextInstance.setVariable() behaves very inperformant

Mirco Graf (JIRA) jira-events at jboss.com
Tue Jan 2 09:34:27 EST 2007


    [ http://jira.jboss.com/jira/browse/JBPM-817?page=comments#action_12349429 ] 
            
Mirco Graf commented on JBPM-817:
---------------------------------

it seems like there are 2 different versions of JbpmType in CVS, only one of them is fixed. nevertheless distribution 3.1.2 still contains the old version without static member.

fixed one:
http://fisheye.labs.jboss.com/browse/JBPM/jbpm.3/jpdl/jar/src/main/java/org/jbpm/context/exe

"old" one:
http://fisheye.jboss.org/browse/JBPM/jbpm.3/src/java.jbpm/org/jbpm/context/exe

> 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

        



More information about the jboss-jira mailing list