title: Missing records due to skipped frames
body: <p>The app im working with is getting data from a .csv (20k-30k records) from a server and it needs to persist the data into an SQLiteDatabase. </p>
  
  <p>It works but some records are missing and appeared that it have been skipped. </p>
  
  <pre><code>I/Choreographer( 2555): Skipped 46 frames!  The application may be doing too much work on its main thread.
  </code></pre>
  
  <p>I know that this error says that the memory consumption is very high due to heavy load. Is there a more efficient way in persisting data in SQLiteDatabase rather than the classic accessing of CSV and processing it from there? </p>
  
  <p>Code for writing in DB</p>
  
  <pre><code>String sql = "INSERT INTO " + tableName
                  + " VALUES (?,?,?,?,?,?);";
          SQLiteDatabase db = openHelper.getWritableDatabase();
          SQLiteStatement statement = db.compileStatement(sql);
  
          try {
              db.beginTransaction();
              String[] sa = null;
              for (final String csvline : arrCSV) {
                  statement.clearBindings();
                  sa = csvline.split(",");
                  if(sa.length==6){
                      statement.bindString(1, sa[0]);
                      statement.bindString(2, sa[1]);
                      statement.bindString(3, sa[2]);
                      statement.bindString(4, sa[3]);
                      statement.bindString(5, sa[4]);
                      statement.bindString(6, sa[5]);
                  }
                  statement.execute();
              }
              db.setTransactionSuccessful();
              Log.d("Transaction", "Successful");
          }catch(Exception e){
              e.printStackTrace();
          }finally {
              statement.releaseReference();
              statement.close();
              db.endTransaction();            
              db.releaseMemory();
          }
  </code></pre>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>The missing records were not loaded in the Collection. 
  Is the skipping of frames the culprit here?
  The loading in the collection is just a simple parsing of a csv file and 
  non replicable at times so Im assuming it is due to the skipping of frames.</p>