Search code examples
androidarraysweblarge-data

Large amounts of data...so confused. I don't want to slow the system down


My app downloads info from the web (which is btw legal according to the sites rules), and then stores them into an array after parsing through each page (64 pages). Those arrays of strings are converted into arrays of relative layouts to make the loading of data onto scrollview much faster (so that if the same page comes again it doesnt have to format all the data again).

I have about 64 arrays of strings and similarly 64 arrays of relative layouts. I need so many arrays because each contain a specific type of data which have to put into the relative layouts in a different formats.

The data consists of statistics and links.

How can I manage such a large amount of data with?

I have come up with how to manage it...but it requires a lot of switch cases and if/else statements.

Any other ideas?


Solution

  • Optimizing your code to ensure that the least amount of time is necessarily is very specific to the information being processed so it is difficult for me to optimize a process I have not seen.

    However, I will say that this is a long task and should be in an Asynctask. You can also update the views as the data is being processed so that it is available the moment you have processed it. This would be done as a onProgressUpdate().

    Information about asynctasks: