Description
This class should be rewritten to use a tree walk, not all this allocating/iterating layers.
See also JSON issue DFDL-1210, which also needs an Infoset tree walker.
class InfosetSourceFromTree(doc: InfosetDocument) extends InfosetSource {
|
//
|
// FIXME
|
// TODO - Performance - this has to be fast. Round trip processing where you first parse
|
// and then unparse data will use this to generate the infoset events.
|
// That's an important use case
|
//
|
// So all this Stream/Iterator baggage has to go and be replaced by a straightforward tree walk.
|
//
|
// Note however, that there are other kinds of infoset tree walks needed (e.g., JSON output, and XML
|
// output should be revise to use this tree walker once it is written.)
|
//
|
// So we need an infoset tree walker that can be used to implement a few patterns.
|
//
|
....
|