You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bill Lucy (JIRA)" <de...@myfaces.apache.org> on 2018/01/09 14:28:01 UTC

[jira] [Created] (MYFACES-4186) Performance concurrency issue in _ComponentAttributesMap

Bill Lucy created MYFACES-4186:
----------------------------------

             Summary: Performance concurrency issue in _ComponentAttributesMap
                 Key: MYFACES-4186
                 URL: https://issues.apache.org/jira/browse/MYFACES-4186
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.3.0-beta, 2.2.12, 2.1.18, 2.0.24
            Reporter: Bill Lucy
            Assignee: Bill Lucy


We've hit a performance issue with the property descriptor map in _ComponentAttributesMap.  Driving a heavy load to an application, we can see threads spending a lot of time in this area:

...
(entered lock: java/util/Collections$SynchronizedMap@0x000000000000000, entry count:1)
at javax/faces/component/_ComponentAttributesMap.getPropertyDescriptor(_ComponentAttributesMap.java:394(Compiled Code))
at javax/faces/component/_ComponentAttributesMap.containsKey(_ComponentAttributesMap.java:165(Compiled Code))
at javax/faces/component/UIComponent.isCompositeComponent(UIComponent.java:239(Compiled Code))
...

In this case, replacing the HashMap used by _propertyDescriptorMap with a ConcurrentHashMap gives us much better performance.  Since we can use a ConcurrentHashMap here, there shouldn't be any performance hit in the normal case.

Related: https://issues.apache.org/jira/browse/MYFACES-3216



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)