Rework data.api.InstanceIdentifier to work on Iterables 30/9330/4
authorRobert Varga <rovarga@cisco.com>
Thu, 3 Jul 2014 16:22:25 +0000 (18:22 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 26 Jul 2014 15:51:32 +0000 (17:51 +0200)
commitfc6717d140a35d797b18d49d0cc4c2014f26dd95
tree25c205dc0e16c04a16df76a50dd362ce0bf3dca9
parent958570194afc23da953c6a4dd8ab9ceac2e7e751
Rework data.api.InstanceIdentifier to work on Iterables

Profiling storage-dominated workloads shows that
InstanceIdentifier.node() is dominating by taking up 16% of the CPU
cycles, with 82% of that being spent in ImmutableList$Builder.addAll().
All of these calls occur in the data change resolution path, where they
account for 53% of CPU time.

This patch removes the ImmutableList at the heart of InstanceIdentifier
with an Iterable, along with all the machinery we know and love from the
binding InstanceIdentifier.

While we are at it, perform complete house-cleaning, compacting code and
tuning it for perfomance.

Change-Id: I52884d5660086ac53647a2a39127578017449b2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/InstanceIdentifier.java