[YANGTOOLS-494] Reuse leaf nodes for low-cardinality types Created: 04/Sep/15  Updated: 10/Apr/22  Resolved: 17/Oct/16

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Robert Varga Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by YANGTOOLS-237 Implement XML Stream Reader to Normal... Resolved

 Description   

In a typical datastore, we can have a rather large number of leaf nodes, whose set of possible values has provably low cardinality, most notably boolean and enumerations.

A typical example would be a L2FIB entry, which has a leaf action, which can have only two values. For 400K entries that translates to overhead of ~8MB in 400K objects.

Introducing a (pre-instantiated?) cache of such leaf nodes would bring this down to a single instance for each NodeIdentifier/value combination, thus lowering our memory overhead. Typical users of this are schema aware translators, such as XML/JSON parsers and DataObject/NormalizedNode codec.



 Comments   
Comment by Robert Varga [ 07/Sep/15 ]

Infrastructure part: https://git.opendaylight.org/gerrit/26625. Once this is merged and BUG-4269 is addressed, we can convert codecs/parsers to take advantage of this.

Comment by Robert Varga [ 10/Oct/15 ]

Utility split: https://git.opendaylight.org/gerrit/28245
Stream writer: https://git.opendaylight.org/gerrit/28246
NormalizedNode builder: https://git.opendaylight.org/gerrit/28247
JSON codec: https://git.opendaylight.org/gerrit/28248

Comment by Robert Varga [ 10/Nov/15 ]

XML parser requiress BUG-4489 being addressed first.

Comment by Robert Varga [ 12/Jan/16 ]

Blocked on BUG-1441, this will need to be fixed in a later release.

Generated at Wed Feb 07 20:53:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.