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

Martin Becker commented on OFBIZ-5169:
--------------------------------------

I wonder why the LinkedList was chosen as the default replacement of FastList 
in Java code instead if an ArrayList (see comment from Jacopo Cappellato 
above). Although it could be a very complex question which implementation to 
choose respecting the concrete logic and the underlying environment, I would 
prefer to use ArrayList as default on the basis of the memory consumption and 
general performance impacts of LinkedList alone. The cases at OFBiz where the 
main benefit of faster insert/remove in the middle/beginning of a large 
LinkedList is relevant should be very rare, especially with moderate list 
sizes. The  disadvantage of ArrayList in growing over the initial capacity 
should always be encountered by specifying an appropriate initial capacity 
where possible.

See short description from oracle:
https://docs.oracle.com/javase/tutorial/collections/implementations/list.html

Another conspicuity: The migrated groovy scripts instead often using the 
default list implementation which is ArrayList by only using „[]“ without 
specifying LinkedList as concrete type.

> Removing Javolution from framework components
> ---------------------------------------------
>
>                 Key: OFBIZ-5169
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5169
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Varun Bhansaly
>            Priority: Minor
>         Attachments: framework-FastList-removed.patch
>
>
> a. Remove static instances of Javolution objects.
> b. Remove other uses of Javolution objects.



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

Reply via email to