Template performance optimisation.