Java application running slower and slower
<p>my Java code is running slower and slower when it is processing a large text file. I can observe that the output of my program is slowing because the increase of the output file is becoming slower. </p>

<p>I am afraid there is a memory leak somewhere. However, when I watch the memory usage through Windows Task Manager's Performance tag, I can see that the memory consumption stays quite stable, only minimal increase. Maybe Windows Task Manager doesn't show the memory leak?</p>

<p>the main logic is like this: read each line of text from the file, process it and store the result of the processing into a map </p>

<pre><code>Map&lt;String, Integer&gt; resultsPerLine = new HashMap&lt;String, Integer&gt;();
</code></pre>

<p>and then store a line number with resultsPerLine into another static map </p>

<pre><code>static Map&lt;Integer, Map&lt;String, Integer&gt;&gt; extractedResultMap
</code></pre>

<p>That's the main code.</p>
