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

Performance: revisit EntityReplacer

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • deferred
    • None
    • Back End, Performance
    • None

      ... we need to start looking into refactoring all the EntityReplacer code. Regular expressions are used very heavily, and results in the creation of a lot of strings (noticed during profiling). And things like input.split("""%""") takes that string, compiles it as a regular expression, and then creates new strings. So that's fairly intensive to be doing at runtime, and there's a lot of it. I feel like the right algorithm would just loop through each character in the string and based on what it sees it adds characters to another. It may add the same character it just saw, it may add a space if it saw %WSP;, it may add a outputNewLine if it saw %NL;, etc.

              Unassigned Unassigned
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: