I checked a JSPerf and there's a significant cost to setting style, even if you're setting it to the same value it already was.  Since we call resize all the time now, we should cache these width/heights somewhere, as a number, and check them before setting them.