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

Performance: DFA changes that may help

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0.0
    • 1.1.0
    • Back End
    • None

      The DFA (deterministic finite automaton) layer does several things it shouldn't.

      1. returns Either objects - these must be allocated, just to identify the return type. This should instead put the result in the Registers or other state objects and just return a boolean flag or case object.
      2. Registers objects are allocated frequently. These can just be a static part of the state of the parser - there is a maximum number of them we need given the most-complex combination of delimiters and escape schemes. We can put that many of them statically into the PState.
      3. Rules - this uses anonymous classes. These may or may not have performance impact, but they definitely make the code harder to debug, and in general for performance-sensitive inner-loop-like parts of the code base, we want to use a more Java-like coding style. These should become ordinary named object classes.

      (note: removed discussion of markPos/resetPos, as that has been implemented on 1.2.0)

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

                Created:
                Updated:
                Resolved: