I'm working on an Android app and I wonder if it is better to load data from a .txt file or from a preloaded SQLite db.
When I take data from a .txt file, I do the following: ("insertar" is a function that inserts key and value into db)
while ((line = buffreader.readLine()) != null) {
keyValue = new String[2];
keyValue = line.split("_");
insertar(keyValue[0], keyValue[1]);
}
I haven't coded a function to copy data from a preloaded database yet.
Do I have any other option in order to be as fast as possible on the first app launch? Which is the most performant method to load data?
Aucun commentaire:
Enregistrer un commentaire