[
https://issues.apache.org/jira/browse/TRINIDAD-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615442#action_12615442
]
Blake Sullivan commented on TRINIDAD-1164:
------------------------------------------
In the case where both the list of indexed children and the map of facet
children are non-empty, Trinidad should be returning a compositer iterator,
delegating to the other two iterators, rather than using an ArrayList.
> getFacetsAndChildren from UIXComponentBase allocates a lot of memory
> --------------------------------------------------------------------
>
> Key: TRINIDAD-1164
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1164
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.2.8-core
> Reporter: Stevan Malesevic
>
> getFacetsAndChildren of UIXComponentBase is invoked number of times during
> request processing (_findInsideOf , decode,....). In the case where component
> has facets the code will rebuild a ArrayList on every invocation. This is
> very expensive in terms of total allocated transient memory and CPU. We
> should save the ArrayList of facets and children first time it is built and
> recreate only in case of change.
> Also, the call _facets.values() which creates iterator seems very expensive.
> Maybe better approach is to just do:
> for(int i = 0; i < _facets.size(); i++)
> {
> childrenAndFacets.add(((FacetHashMap)_facets).getValue(i));
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.