Use pre-sized ImmutableLists for yang-data-api 55/78155/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Nov 2018 17:23:50 +0000 (18:23 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 26 Nov 2018 10:07:58 +0000 (10:07 +0000)
commit07a87065c9783608ecc83f3ddd201be4a17bedcb
tree641aee4b4478db7418f73a7dcbd4ca0a66d3c318
parent37ddb05de5d6ad394c240234f0964d3f18929978
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>
(cherry picked from commit da9ee8c80328bd6e21064e44f95f29ffc1e99d41)
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java