// Applies optimizations to improve performance.
// These steps are entirely optional, and are not required for correctness.
templateFactory = setupOptimizerFactory(templateFactory);
TemplateLoader templateLoader;
List<DelegatingTemplateLoader> delegatingTemplateLoaders =
new LinkedList<DelegatingTemplateLoader>();
AutoEscapeOptions autoEscapeOptions = new AutoEscapeOptions();
autoEscapeOptions.setPropagateEscapeStatus(options.getPropagateEscapeStatus());
autoEscapeOptions.setLogEscapedVariables(options.getLogEscapedVariables());