[
https://issues.apache.org/jira/browse/TRINIDAD-2447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andy Schwartz updated TRINIDAD-2447:
------------------------------------
Status: Patch Available (was: Open)
> UIComponent.isCompositeComponent() is slow for UIXComponents
> ------------------------------------------------------------
>
> Key: TRINIDAD-2447
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2447
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 2.1.0-core
> Reporter: Andy Schwartz
> Assignee: Andy Schwartz
> Priority: Minor
> Attachments: trinidad-2447.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)