This lowers the default allocation of 16 to 8, hopefully lowering memory
pressure.
Change-Id: I72218f71a4407e0cdd802984b2edaf8fdfe8d3b2
Signed-off-by: Robert Varga <rovarga@cisco.com>
throw new IllegalArgumentException(String.format("Unhandled modification type %s", input.getOperation()));
}
};
+ private static final int DEFAULT_CHILD_COUNT = 8;
private final Map<PathArgument, ModifiedNode> children;
private final Optional<TreeNode> original;
children = Collections.emptyMap();
break;
case ORDERED:
- children = new LinkedHashMap<>();
+ children = new LinkedHashMap<>(DEFAULT_CHILD_COUNT);
break;
case UNORDERED:
- children = new HashMap<>();
+ children = new HashMap<>(DEFAULT_CHILD_COUNT);
break;
default:
throw new IllegalArgumentException("Unsupported child tracking policy " + childPolicy);