BUG-650: allocation-free ResolveDataChangeState.needsProcessing()
authorRobert Varga <rovarga@cisco.com>
Mon, 8 Sep 2014 18:46:32 +0000 (20:46 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 8 Sep 2014 18:50:28 +0000 (20:50 +0200)
commit67d6183730db9f2d8ade415cf766838236d4d8cb
treea228bfbef9f0da7a4880c0478c4c5d7b1cd32065
parent718890766cd2545afdc47c76ed5ccbd88dac5ba9
BUG-650: allocation-free ResolveDataChangeState.needsProcessing()

Critical path optimization. Based on logic introduced in previous
patches, we now know that when the inherited subtree listener iterable
is not a Collection, it is by definition non-empty. Use this knowledge
to elide Iterables.isEmpty() which is (relatively) costly due to
object allocation.

With this patch, ResolveDataChangeState.needsProcessing() does not
allocate any objects and relies on readily-available state to determine
whether additional processing is required.

Change-Id: I0322e0a8f58165f695f2284116057d03e2d4cb45
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