Faster box resizing when there are lots of boxes