Use blocking call in main thread Use requestAnimationFrame Use a worker