Prepare Data source in the background thread.