Use pre-sized ImmutableLists for yang-data-api 17/78117/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Nov 2018 17:23:50 +0000 (18:23 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Nov 2018 17:26:44 +0000 (18:26 +0100)
commitda9ee8c80328bd6e21064e44f95f29ffc1e99d41
treea9e779806b8b8eeafdc7b5fa7959435ceb79fa48
parente1ede0942d3bff1f1b150816e6bfa96ed9366c20
Use pre-sized ImmutableLists for yang-data-api

ImmutableList.builder() did not pre-size its arrays correctly,
leading to poor performance. That is no longer the case and we can
correctly pre-allocate it -- giving us the ArrayList equivalent in
immutable form, hence skipping copying in
{SchemaPath,YangInstanceIdentifier}.create()

Change-Id: I4a070dca26138f28de69e4a0e1f9b0298ee2312b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.