enhance template rendering profermance