abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Nordvik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ABDERA-401) ExtensionFactoryMap is slow for concurrent access
Date Fri, 10 Oct 2014 16:29:33 GMT
Henrik Nordvik created ABDERA-401:

             Summary: ExtensionFactoryMap is slow for concurrent access
                 Key: ABDERA-401
                 URL: https://issues.apache.org/jira/browse/ABDERA-401
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 1.1.2
            Reporter: Henrik Nordvik

During profiling we found ExtensionFactoryMap to be a bottleneck. Most threads were blocked

   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.apache.abdera.factory.ExtensionFactoryMap.getElementWrapper(ExtensionFactoryMap.java:46)
        - waiting to lock <0x0000000780cf2840> (a java.util.Collections$SynchronizedRandomAccessList)
        at org.apache.abdera.parser.stax.FOMFactory.getElementWrapper(FOMFactory.java:827)
        at org.apache.abdera.parser.stax.FOMDocument.getRoot(FOMDocument.java:106)
        at org.apache.abdera.parser.stax.FOMElement._parse(FOMElement.java:590)
        at org.apache.abdera.parser.stax.FOMContent.setValue(FOMContent.java:299)
        at org.apache.abdera.parser.stax.FOMEntry.setContent(FOMEntry.java:224)

This class should be rewritten to not use synchronized, but e.g. use an immutable list, and
copy and swap it when you add new elements.

This message was sent by Atlassian JIRA

View raw message