[jira] [Commented] (MYFACES-3435) [perf] _DeltaList: use ArrayList as parent

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (MYFACES-3435) [perf] _DeltaList: use ArrayList as parent

My Faces - Dev mailing list

    [ https://issues.apache.org/jira/browse/MYFACES-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123359#comment-16123359 ]

Leonardo Uribe commented on MYFACES-3435:
-----------------------------------------

I remember it is a trade-off between memory and speed/better code. View Pooling adds some extra cases to _DeltaList (reset delta), so it is an open case, that's the reason why the issue is still open. I would not apply it in 2.2 or lower versions but maybe for 2.3

> [perf] _DeltaList: use ArrayList as parent
> ------------------------------------------
>
>                 Key: MYFACES-3435
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3435
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.0.12-SNAPSHOT, 2.1.6-SNAPSHOT
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>            Priority: Minor
>         Attachments: _ComponentChildrenList2.java, MYFACES-3435-2.patch, MYFACES-3435-7.patch, MYFACES-3435.patch
>
>
> Two internal classes _DeltaList in API:
> 1) now use delegation pattern, but are always initialized with an ArrayList instance -> use inheritance and  ArrayList as parent -> improvement in memory area, reduces number of GCed object in one request/response of (_DeltaList instances/2)
> 2) initialize expected size of _DeltaList (for example, number of validators per one component is perhaps never 10, use: new _DeltaList(5))
> 3) use indexes in 'for' instead of iterator (java.util.RandomAccess) ->  improvement in performance



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)