[
https://issues.apache.org/jira/browse/DAFFODIL-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046698#comment-18046698
]
Mike Beckerle commented on DAFFODIL-3060:
-----------------------------------------
Yeah, this code has to change so that the ending alignment (approx) for a term
must take into account its own array or optionalness. That way things after it
don't have to know anything about it.
If a term is having to reason about whether the prior term is optional or array
the code is definitely not factored properly.
The only thing a term should have to know is whether it is the first term in a
sequence, in which case it doesn't get to use the ending of the prior term, but
the proper position from the attributes of the enclosing model group.
> Refactor priorAlignment prior sibs logic
> ----------------------------------------
>
> Key: DAFFODIL-3060
> URL: https://issues.apache.org/jira/browse/DAFFODIL-3060
> Project: Daffodil
> Issue Type: Improvement
> Components: Back End, Performance
> Affects Versions: 4.0.0
> Reporter: Olabusayo Kilo
> Priority: Minor
>
> Currently we calculate/return alignment for all potential prior sibs for each
> term, meaning if we have required element A, optional B1 to BN, and current
> term C, for each term, we calculate the alignments of each sibs
> quadratically. This can be optimized to linearly and still account for
> optionality if for the current term, we only consider the endingAlignment of
> its immediate previous sibling
--
This message was sent by Atlassian Jira
(v8.20.10#820010)