improve performance of canvas clearing

clearRect is a lot faster than setting height and width. Especially setting height slows down chrome by a factor of 2 or 3.