generation process moved to a separate thread to stop blocking the UI