-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
When we are considering a statement for reuse of EffectiveStatement, we need to consult both the statement itself and its substatements.
The substatement consultation is very rudimentary: we only deal with the case on empty statements and fall back to normal instantiation for everything else.
There is a middle step we can take: if all substatements are CONTEXT_INDEPENDENT or IGNORE, we can reuse all of the substatements, skipping their instantiation.
While this is very similar to the aims of YANGTOOLS-1067, this mechanism should kick in sooner, i.e. when the statement completes EFFECTIVE_MODEL, we can determine the outcome and store it as a single bit. Subsequent (recursive) checks will use this cached value and will apply to all copy operations. YANGTOOLS-1067 then deals with the case when all substatements (including nominally non-reusable DECLARED_COPY) determine they can be reused for a particular copy operation (on a case-by-case basis).
- relates to
-
YANGTOOLS-1067 Use flyweight EffectiveStatement implementations
- Resolved