I worked in android app that read large text file from server (20 MB) line by line , After each line insert into sqlite DB some data extracted from this line and so on .
the problem is, this application takes one hour approximately to finish reading this file . note : there are 400,000 line in this file .
how could i fast this operation to take 3 or 4 minutes ? Thanks for your help .
public void readArData() {
try {
URL url = new URL("http://10.0.2.2/xy.txt");
BufferedReader in = new BufferedReader(new
inputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
// insert into Sqlite DB
}
in.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}
}