[
https://issues.apache.org/jira/browse/DAFFODIL-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence updated DAFFODIL-1480:
-------------------------------------
Fix Version/s: 4.2.0
> Performance: revisit EntityReplacer
> -----------------------------------
>
> Key: DAFFODIL-1480
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1480
> Project: Daffodil
> Issue Type: Improvement
> Components: Back End, Performance
> Reporter: Mike Beckerle
> Priority: Minor
> Labels: beginner
> Fix For: 4.2.0
>
>
> ... 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)