Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.0-core
-
None
Description
The JSF implementations hammer on UIComponent.isCompositeComponent () - eg. this is called for each time the pushComponentToEL()/popComponentFromEL() methods are called, which is all of the time.
isCompositeComponent() performs the following check:
component.getAttributes().containsKey(Resource.COMPONENT_RESOURCE_KEY);
Unfortunately, this operation is slower than it should be for Trinidad-based UIXComponents. There reason for this is the non-optimal implementation of containsKey in Trinidad's ValueMap:
public boolean containsKey(Object key)
{ if (key == null) throw new NullPointerException(); PropertyKey propertyKey = _getPropertyKey(key); if (_bean.keySet().contains(propertyKey)) return true; else return _bean.bindingKeySet().contains(propertyKey); }We're creating key sets for both the FacesBean properties and value expressions. Aside from the overhead of creating these key sets, this also means that we bypass optimizations in FlaggedPropertyMap.
This is showing up as a hot spot in JProfiler, so would like to see this optimized.