[MDSAL-408] Cache default-valued key leaf items Created: 14/Dec/18 Updated: 14/Dec/18 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding runtime |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
https://tools.ietf.org/html/rfc7950#section-7.8.2 specifies that all leaves which are part of a key must be given a value, disregarding any 'default' statements, making them effectively mandatory. This is unfortunate for the case where there is a composite key, with one of the leaves having a 'default' value: here the use case is that the default value represents a common value, such as path-id=0 for non-add-path BGP routes, being used when no other information is present. In a typical deployment, there may be a significant number, if not vast majority, of list items, which have path-id set to this default value, hence it would make sense to use a single LeafNode to represent them. Teach binding-dom-codec to watch for such keys and maintain a cache, possibly integrated with Note that comparing values can lead to significant overheads, hence the cache should probably use identity checks to discover candidates for deduplication – which leads to the question of how would a Binding application discover the identity objects. |