record template optimization