BUG-650: speed up ResolveDataChangeState.needsProcessing()
authorRobert Varga <rovarga@cisco.com>
Mon, 8 Sep 2014 16:32:39 +0000 (18:32 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 8 Sep 2014 16:50:14 +0000 (18:50 +0200)
commit6451d127d04b38de0c8ae7da7051deb5eda5ff6b
tree0698fedf9bfa23369baf561cdb661677d46e03f9
parente046f0885b622ab95b8c60fc775c46d920788894
BUG-650: speed up ResolveDataChangeState.needsProcessing()

Checking for empty subBuilders allows us to reuse the parent's
collection. For simple cases with no listeners whis speeds up
needsProcessing() by completely reusing the emptyList and for
non-trivial cases it just omits object instantiation.

Change-Id: Ib3089bca2ec4f7e1ef826bf4192b8154ff154702
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/ResolveDataChangeState.java