myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Andraschko (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3435) [perf] _DeltaList: use ArrayList as parent
Date Fri, 11 Aug 2017 13:31:01 GMT


Thomas Andraschko commented on MYFACES-3435:

[~lu4242] Not sure!
I checked our applications and on _SMALL_ views, MyFaces creates around ~350 _DeltaLists,
which means mean the patch could save around ~350 ArrayList instances of we change from wrapping
to inheritance.
For multiple users and on bigger views, this are a lot of ArrayList instances we could just

> [perf] _DeltaList: use ArrayList as parent
> ------------------------------------------
>                 Key: MYFACES-3435
>                 URL:
>             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:, MYFACES-3435-2.patch, MYFACES-3435-7.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

View raw message