Optimize canvas rendering