Fast parsing for template