stevedlawrence opened a new pull request #439: URL: https://github.com/apache/incubator-daffodil/pull/439
The CLI currently reads in the entire infoset into memory and unparses from that. This means that the CLI cannot be be used to unparse very large infosets due to memory limitations. In some cases we do want to read the infoset into memory, such as with the performance command to avoid IO latency, or with the --stream option, which must scan the input looking for the end of each stremamed infoset. We also must do this if we are unparsing from something like a Scala XML Node, since we must read the entire infoset to convert it to a Node. But in cases where possible, we should not read the entire infoset into memory, and instead just treat is as an InputStream and let the InfosetInputter read in the infoset as needed. This changes the infosetDataToInputterData function to accept either an Array[Byte] or an InputStream and return an InputStream where possible. The getInfosetInputter function then uses the appropriate InputStream for the InfosetInputter, thus avoiding reading the entire infoset into memory in some cases. DAFFODIL-2412 ---------------------------------------------------------------- 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: [email protected]
