[ 
https://issues.apache.org/jira/browse/MYFACES-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved MYFACES-3552.
-------------------------------------
       Resolution: Fixed
         Assignee: Leonardo Uribe
    Fix Version/s: 2.2.10

I review it back this issue again and I notice that we can rewrite the 
algorithm without affect its behavior and in that way avoid the array 
instantiation, which is the important thing here (I miss that point on the 
previous discussion). It works, so I have just committed that version. Thanks 
to Martin Koci for provide a patch.

> [perf] pps: reduce amout of Object [] created in _DeltaList.saveState
> ---------------------------------------------------------------------
>
>                 Key: MYFACES-3552
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3552
>             Project: MyFaces Core
>          Issue Type: Improvement
>            Reporter: Martin Kočí
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 2.2.10
>
>         Attachments: MYFACES-3552-v1.patch
>
>
> consider a component with 5 listeners (or other attached objects). All 
> listeners implement PartialStateHolder.
> In a ideal case, delta is 0.
> javax.faces.component._DeltaList.saveState(FacesContext) currently creates :
> 1) a Object [] array with length 5
> 2) a  _AttachedDeltaWrapper, one for each listener, 5 total
> but in the end, when delta is 0, saveState returns null and all object are 
> GCed immediately



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to