Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1661

Performance: rewrite InfosetCursorFromXMLEventCursor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Back End
    • Labels:
      None

      Description

      rewrite InfosetCursorFromXMLCursor to be InfosetCursorFromXMLStreamReader.

      XMLStreamReader is the lowest level interface to XML available. It allocates almost nothing. It is a cursor style interface with next(), hasNext() then provides an integer which is the event type. You only construct a string for the element name if you call getName, etc.

      I investigated Scala's scala.xml.pull parser, and it is to be avoided - uses threads underneath. Just what we're trying to get away from.

      Then we should drop Infoset.elem2Infoset and related methods and reimplement using the above so we have exactly one thing that reads XML-representations of daffodil infosets.

      I found the implementation of XMLStreamReader which is StreamReaderBufferProcessor. This is definitely the lowest level interface to XML, and it's a cursor (i.e., non-allocating) API, so is the right one for us to call.

      We have to rewrite this for performance reasons.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              dthompson David Thompson
              Reporter:
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks