There is a specific event for when an image has finished loading, so trigger on that rather than polling. The polling interval of requestAnimationFrame() can also be very large.