[jboss-jira] [JBoss JIRA] Commented: (BPEL-309) Performance improvement: use a HashMap in SetNamespaceContext instead of iterating through all namespaces

Aleksander Adamowski (JIRA) jira-events at lists.jboss.org
Fri Oct 23 18:31:06 EDT 2009


    [ https://jira.jboss.org/jira/browse/BPEL-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12491321#action_12491321 ] 

Aleksander Adamowski commented on BPEL-309:
-------------------------------------------

I've began tracking all of my changeset using GIT on GitHub, since they start to be hard to manage without a SCM.

The project on GitHub is:
http://github.com/aadamowski/jbpm-bpel

The general performance fixes are on the perf-general branch:
http://github.com/aadamowski/jbpm-bpel/tree/perf-general

This particular patch is commit 29d836a2439836dd9bcb3f95069fb52d1a5793d9:
http://github.com/aadamowski/jbpm-bpel/commit/29d836a2439836dd9bcb3f95069fb52d1a5793d9

> Performance improvement: use a HashMap in SetNamespaceContext instead of iterating through all namespaces
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: BPEL-309
>                 URL: https://jira.jboss.org/jira/browse/BPEL-309
>             Project: jBPM BPEL
>          Issue Type: Patch
>      Security Level: Public(Everyone can see) 
>          Components: Engine
>    Affects Versions: jBPM BPEL 1.1.1
>            Reporter: Aleksander Adamowski
>            Assignee: Alejandro Guizar
>         Attachments: jbpm-bpel-SetNamespaceContext-HashMap.patch
>
>
> During profiling of an application based on jBPM-BPEL, we've discovered that the dominating method which has the largest inherent CPU time is org.jbpm.bpel.sublang.xpath.SetNamespaceContext.translateNamespacePrefixToUri, being invoked over 70000 times for a single business process execution, and consuming unreasonably large amounts of CPU time do this amount of invocations when compared to other methods.
> After closer inspection, it turned out that the method simply iterates over the set of all known namespaces when looking for an URI.
> This seriously impacts jBPM-BPEL performance.
> Adding a simple HashMap allows performing the lookup much faster and eliminates the biggest CPU hog in jBPM-BPEL for us.
> Attaching the trivial patch.

-- 
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