parallelize the template compilation