This patch uses a shared NodeIdentifier instance for nodes coming in
from JSON. The lookup cost is offset by memory savings coming from not
having duplicate identifiers.
Change-Id: I6478d55b9e3076c0a78fad121a232efb8678b187
Signed-off-by: Robert Varga <rovarga@cisco.com>
public abstract void write(final NormalizedNodeStreamWriter writer) throws IOException;
protected final NodeIdentifier provideNodeIdentifier() {
- return new NodeIdentifier(schema.getQName());
+ return NodeIdentifier.create(schema.getQName());
}
@Override