Refactor Leaf(List)EffectiveStatementImpl 15/86815/24
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 Jan 2020 23:22:32 +0000 (00:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Jan 2020 13:22:18 +0000 (14:22 +0100)
commit59f98cbf8ef79ecab8ee6d7c5141704142b0f40a
tree4cf8ab0ffacb320eede123b55701a3aef7dd690c
parent7bb6ae1269659c12efc127b97cc750ed81ecaac6
Refactor Leaf(List)EffectiveStatementImpl

Leaf(List)EffectiveStatementImpl costs 88 bytes each instance in common
Linux deployment. This turns out to be unnecessary, as be can easily
drop the size to 32/40 (48 worst) bytes by splitting out well-known
constants. This can represent as much as 10% savings on retained heap.

Since the two statements are sharing mapping towards SchemaNode world,
we introduce EffectiveStatementMixins -- utility bridge interfaces,
which are implementing aspects of DocumentedNode and its subclasses
in terms of EffectiveStatement and some mixed-in state.

JIRA: YANGTOOLS-1065
Change-Id: Icdafc4a196d86d2a493a44523bc81b1024854acb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 files changed:
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/BaseQNameStatementSupport.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/BaseStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/EffectiveStatementMixins.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/EffectiveStmtUtils.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/AbstractLeafEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/EmptyLeafEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/LeafEffectiveStatementImpl.java [deleted file]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/LeafStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf/RegularLeafEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractLeafListEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractLeafListStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/AbstractNonEmptyLeafListEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/EmptyLeafListEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/LeafListEffectiveStatementImpl.java [deleted file]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/RegularLeafListEffectiveStatement.java [new file with mode: 0644]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/leaf_list/SlimLeafListEffectiveStatement.java [new file with mode: 0644]