mbeckerle commented on a change in pull request #324: WIP: DAFFODIL-1444 Schema Compiler Space/Speed URL: https://github.com/apache/incubator-daffodil/pull/324#discussion_r379245688
########## File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ModelGroup.scala ########## @@ -160,7 +162,15 @@ abstract class ModelGroup(index: Int) groupMembers.forall { _.hasStaticallyRequiredOccurrencesInDataRepresentation } } - def groupMembers: Seq[Term] + final def turnOnSharing = true + + final def groupMembers: Seq[Term] = + if (turnOnSharing && this.isSharingATerm) + sharedModelGroup.groupMembers1 + else + groupMembers1 + Review comment: The above is 1/2 the magic. If turnOnSharing, and this term has a shared proto-term, then use that to get the group members. This eliminates all the combinatorial explosion of creating DSOM objects recursively. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services