Garbage Collector slowing down the application when iterating the arraylist
<p>I use the following code to convert elements from ArrayList to string:</p>

<pre><code>public static List&lt;Location&gt; GPSLocalLocations = new ArrayList&lt;Location&gt;(1);
String mystr = "";
for (int i=0; i&lt;GPSService.GPSLocalLocations.size(); i++)
{
mystr += "\n" + GPSService.GPSLocalLocations.get(i).toString();
}
</code></pre>

<p>Changed my code to the following:</p>

<pre><code>for (int i=0; i&lt;GPSService.GPSLocalLocations.size(); i++)
{
    gpslog.append("\n").append(GPSService.GPSLocalLocations.get(i).toString());
}
</code></pre>

<p>It causes less GC Free messages :). My mistake, application didn't hang because of that... I think because I ran a my ASyncTask multiple times... </p>

<p>But still iterating ArrayList of more than 1000 elements takes some time [about 10 seconds]. Is that ok?</p>
