Optimize NodeIdentifier reading 61/82461/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 29 May 2019 10:10:52 +0000 (12:10 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 9 Jun 2019 22:10:49 +0000 (00:10 +0200)
commit8edae6ac0a05f2f6263241ce132061aceeae2f04
tree38833ccd2b17623a27fba1c0d962e55f353da18b
parentaec4fefef94890a35f9e637575f29d91b7b7504f
Optimize NodeIdentifier reading

NodeIdentifiers are just an alias for QName, which is heavily
reused. This patch adds a secondary cache for interpreting QNames
as NodeIdentifiers, with instance reuse.

This allows us to reduce the number of NodeIdentifier instances,
while not relying on NodeIdentifier.create() for the common lookup
case.

JIRA: CONTROLLER-1898
Change-Id: Ifa0c5d572f7d39da49707529c7ddd9c9f36f2dab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5f540931c1f8972b59e51556b6cba14b2c8f3f40)
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SodiumNormalizedNodeInputStreamReader.java