Optimize ModifierImpl.AbstractPrerequisite 88/104388/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Feb 2023 10:17:31 +0000 (11:17 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Feb 2023 11:57:14 +0000 (12:57 +0100)
commita9bd1a493db611489687effeaeab9f2dc5d3af32
treedca8c09ca4fd7f702fd227886a2aa4c6e03916ca
parent58b3d30ba4454b357de434bfaaa53b798ca8495a
Optimize ModifierImpl.AbstractPrerequisite

Object analysis shows we are recording outer class multiple times,
leading to suboptimimal object layout. Make the class hierarchy static,
with outer class recorded in explicit field, reducing
size of PhaseModificationInNamespacePath from 40-80 (48 typical) bytes
to 32-64 (40 typical) bytes. Other subclasses observe a similar
reduction.

JIRA: YANGTOOLS-1486
Change-Id: Ifc3da86a564bc54f4247996e622787a8528422b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 007dd4ccf28dd4288bafbce38a00c2b8d3ec2a68)
parser/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/ModifierImpl.java