myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blake Sullivan (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-1164) getFacetsAndChildren from UIXComponentBase allocates a lot of memory
Date Mon, 21 Jul 2008 21:45:31 GMT


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:
>             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.

View raw message