private TemplateFactory setupOptimizerFactory(TemplateFactory templateFactory) {
// DataCommandConsolidator saves state so we need to create a new one
// every time we run it.
OptimizerProvider dataCommandConsolidatorProvider = new OptimizerProvider() {
public Switch getOptimizer() {
return new DataCommandConsolidator();
}
};
// SyntaxTreeOptimizer has no state so we can use the same object
// concurrently, but it is cheap to make so lets be consistent.