From f57da82ed313a3c17a5f8b2a7ee3ec5bb5ff4263 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sat, 16 Jan 2016 02:05:31 +0100 Subject: [PATCH] BUG-865: deprecate recursive node instantiation Recursive create() method forces a full materialization, which is slow and not memory-efficient. Lazily-instantiated nodes work equally well using less memory. Change-Id: I320f375090df480c1b376f543cb0b00649b44234 Signed-off-by: Robert Varga --- .../yang/data/api/schema/tree/spi/TreeNodeFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/spi/TreeNodeFactory.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/spi/TreeNodeFactory.java index e728bfaae2..05af016687 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/spi/TreeNodeFactory.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/spi/TreeNodeFactory.java @@ -94,7 +94,10 @@ public final class TreeNodeFactory { * @param data data node * @param version data node version * @return new AbstractTreeNode instance, covering the data tree provided + * + * @deprecated Use lazy node initialization via {@link #createTreeNode(NormalizedNode, Version)}. */ + @Deprecated public static TreeNode createTreeNodeRecursively(final NormalizedNode data, final Version version) { if (data instanceof NormalizedNodeContainer) { @SuppressWarnings("unchecked") -- 2.36.6