Break down long tasks into smaller tasks, avoid blocking the main process.
github.com/berwin/time-slicing
berwin/time-slicing