The performance of the rendering process can be improved by
- changing the
TextEscaper interface method to void appendEscaped(Appendable out, String text); - thus preventing the intermediate step of creating a new String containing the escaped text
- changing the
Indenter interface method to void appendIndented(Appendable out, int level, String text); - same idea: don't create a temporary string, but write indent and text directly to out
I'm not sure if this can be realized in a backward compatible way - so probably this is something for 2.0
The performance of the rendering process can be improved by
TextEscaperinterface method tovoid appendEscaped(Appendable out, String text);- thus preventing the intermediate step of creating a new String containing the escaped textIndenterinterface method tovoid appendIndented(Appendable out, int level, String text);- same idea: don't create a temporary string, but write indent and text directly tooutI'm not sure if this can be realized in a backward compatible way - so probably this is something for 2.0