I do my reading of lat, long etc values using the Open CSV reader - as I read somewhere that this is faster than using Buffered InputStream Reader? (Is that true?).
This reading happens in the "doInBackground
" method of the AsyncTask
.
From the resulting array, I call the on "onProgressUpdate
" method where I call a method to draw these markers on the Google Maps instance.
I also have marker clustering implemented, which is called while this is being done. As you know I need to call the array of items (marker data) one more time to send it as input to the ClusterManager class. Then, in "onPostExecute
", I simply display a toast saying the loading is complete.
When I supplied about 5000 markers, I get a Memory out of bounds exception! But, I have to display about 10000 overall.
Now, the question is what are the ways to make this processing much faster and efficient, while keeping the CSV file. Please tell me if threading can be used anywhere during this process (I am new and don't know much - so clarity is of essence).