[
https://issues.apache.org/jira/browse/TRINIDAD-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias Weßendorf resolved TRINIDAD-1164.
------------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.10-core
1.2.10-core
> 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
> Assignee: Matthias Weßendorf
> Fix For: 1.2.10-core, 1.0.10-core
>
> Attachments: trinidad-1164.patch, trinidad-1164_blake.patch
>
>
> 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.