throttle the resize event by reflowing inside the render loop