Optimizing canvas