BUG-7464: Optimize LNode.removed() 19/49919/8
authorRobert Varga <rovarga@cisco.com>
Sun, 1 Jan 2017 23:44:45 +0000 (00:44 +0100)
committerRobert Varga <rovarga@cisco.com>
Tue, 10 Jan 2017 19:12:11 +0000 (20:12 +0100)
commit1310d9a001b91095ef550f1dafef84d8502cc4ad
tree1ac974a52a9d12e877f9010b59d9e111b6b5d726
parent7c1da69d3100e377401566fd24b13c0f8fe629f5
BUG-7464: Optimize LNode.removed()

Using ListMap.size() is heavy if we have a lot of hash
collisions from a bad key hash function. LNode removal
does not need to know the precise size -- only the fact
that the ListMap is holding a single entry, so it can
compress down to an SNode.

Change-Id: I99ee07e1becde2c3d6830406828f2000c79f345d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/LNode.java
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/ListMap.java