optimizes the master template rendering.

Signed-off-by: Vinayak Patil <vinayakpat@cybage.com>