Track current path in a stack
Rather than creating temporary InstanceIdentifiers, which eagerly
calculate hashCode and cost 32-64 bytes each, use a dedicated stack,
which costs 72-112 bytes without the need for hash code computations.
Since a DataTree may not start at YangInstanceIdentifier.EMPTY, we
need to have a dedicated subclass to properly report the full path.
The contents of the stack are converted to a YangInstanceIdentifier
when needed -- which is only in error paths.
Change-Id: Ifd77a79e6d7481a4355ecb052c9fc2d2c3c1f463
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 files changed: