Details
Description
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.