Change trackerList to a LinkedList 74/14474/1
authorRobert Varga <rovarga@cisco.com>
Sun, 25 Jan 2015 08:50:11 +0000 (09:50 +0100)
committerRobert Varga <rovarga@cisco.com>
Sun, 25 Jan 2015 09:07:19 +0000 (10:07 +0100)
commitdb4f9d10a8b2ddb46300635b9993c6fffeb9b394
tree577c3ddbfe278ed517076e44f03a642120dc25b5
parentb053e2971dc677fd3c71168777c1f1851a022040
Change trackerList to a LinkedList

The trackers are being added to the end and usually remove in a linear
fashion. An ArrayList's remove() method makes sure the backing array is
packed -- which means we end up copying the array over and over again.

Changing the trackerList to a LinkedList removes the need for copying at
the expense of memory footprint and cache locality.

Change-Id: I3e40487798eb64713ed4526f53a0a8c385a9a778
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java