Do not resize the canvas on every resize event, but queue events and batch process them.