I want to save huge data in local Database on background but my unity IDE will be hang for 2-3 minutes when I try to save the data. After 2-3 minutes it's work perfectly .can anyone please suggest me how can i do that..Below is my sample code
private IEnumerator WaitAndPrint(TestController.TestReportModel report)
{
dbHelper.deleteAllFromTable(dbHelper.TABLE_OFFLINE_MASTER_TEST_REPORT);
dbHelper.deleteAllFromTable(dbHelper.TABLE_MASTER_OFFLINE_POINT_DATA);
for (int i = 0; i < report.data.Count; i++)
{
TestController.TestData MasterData = report.data[i];
dbHelper.AddOfflineMasterTestReport(MasterData, "");
}
yield return new WaitForSeconds(1);
}