Tasks cost longer than 1 second in main thread is better to split into web workers.