-
Improvement
-
Resolution: Unresolved
-
Normal
-
None
-
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.