stevedlawrence opened a new pull request #331: Fix deep stack sizes when serializing some schemas URL: https://github.com/apache/incubator-daffodil/pull/331 The "parents" val in a DPathCompileInfo is a backpointer to all DPathCompileInfo's that reference it. The problem with this is that when elements are shared, these backpointers create a highly connected graph that requires a large stack to serialize using the default java serialization as it jumps around parents and children. To avoid this large stack requirement, we make the parents backpointer transient. This prevents jumping back up to parents during serialization and results in only needing a stack depth relative to the schema depth. Once all that serialization is completed and all the DPathCompileInfo's are serialized, we then manually traverse all the DPathCompileInfo's again and serialize the parent sequences (via the serailizeParents method). Because all the DPathCompileInfo's are already serialized, this just serializes the Sequence objects and the stack depth is again relative to the schema depth. On complex schemas, this saw an order of magnitude reduction in stack size during serialization. DAFFODIL-2283
---------------------------------------------------------------- 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