BUG-648: do not keep HashMap$Values around
Profiling has identified that we keep a lot (>600K) of HashMap$Values
objects around. This is caused by our class hierarchy, which forces the
Container nodes to supply their Iterable values at construction time --
which means they have to capture children.values() and wrap it in an
UnmodifiableIterable.
This patch creates splits the functionality of
AbstractImmutableNormalizedNode into two:
AbstractImmutableNormalizedNode, which just holds the identifier plus
the infrastructure layout. AbstractImmutableNormalizedValueNode, which
additionally holds the value.
Container nodes are then made subclasses of the former, which allows
them to provide getValue() dynamically, thus avoiding the unnecessary
instantiation.
Change-Id: I3fb894b0eeef3cd4a7b0de7634d4638c72c66fc3
Signed-off-by: Robert Varga <rovarga@cisco.com>