<div dir="ltr">On Sun, Jul 20, 2008 at 12:34 AM, Bulat Ziganshin &lt;<a href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Krzysztof,<br>
<div class="Ih2E3d"><br>
Sunday, July 20, 2008, 1:55:45 AM, you wrote:<br>
&gt;&gt;&gt; 532 MB total memory in use (4 MB lost due to fragmentation).<br>
<br>
</div>i think that Parsec library should hold entire file in memory only when<br>
you use &#39;try&#39; for whole file. otherwise it should omit data as<br>
proceeded<br>
<div><br></div></blockquote></div><br>That&#39;s exactly what I thought. But even if I remove the only &#39;try&#39; I use the memory consumption remains unchanged:<br><br>C:\cygwin\home\Metharius\killer\KillerPy\ansi2html\ansi2html_old.exe duzy.log +RTS -sstderr<br>
File duzy.log processed. It took 5.046875s. File size was 4166578 characters.<br>&nbsp;&nbsp; 3,950,649,704 bytes allocated in the heap<br>&nbsp;&nbsp;&nbsp;&nbsp; 535,544,056 bytes copied during GC<br>&nbsp;&nbsp;&nbsp;&nbsp; 117,603,408 bytes maximum residency (9 sample(s))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,647,828 bytes maximum slop<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 265 MB total memory in use (2 MB lost due to fragmentation)<br><br>&nbsp; Generation 0:&nbsp; 7527 collections,&nbsp;&nbsp;&nbsp;&nbsp; 0 parallel,&nbsp; 0.86s,&nbsp; 0.86s elapsed<br>&nbsp; Generation 1:&nbsp;&nbsp;&nbsp;&nbsp; 9 collections,&nbsp;&nbsp;&nbsp;&nbsp; 0 parallel,&nbsp; 0.80s,&nbsp; 0.81s elapsed<br>
<br>&nbsp; INIT&nbsp; time&nbsp;&nbsp;&nbsp; 0.02s&nbsp; (&nbsp; 0.00s elapsed)<br>&nbsp; MUT&nbsp;&nbsp; time&nbsp;&nbsp;&nbsp; 3.20s&nbsp; (&nbsp; 3.63s elapsed)<br>&nbsp; GC&nbsp;&nbsp;&nbsp; time&nbsp;&nbsp;&nbsp; 1.66s&nbsp; (&nbsp; 1.67s elapsed)<br>&nbsp; EXIT&nbsp; time&nbsp;&nbsp;&nbsp; 0.00s&nbsp; (&nbsp; 0.00s elapsed)<br>&nbsp; Total time&nbsp;&nbsp;&nbsp; 4.88s&nbsp; (&nbsp; 5.30s elapsed)<br>
<br>&nbsp; %GC time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34.0%&nbsp; (31.6% elapsed)<br><br>&nbsp; Alloc rate&nbsp;&nbsp;&nbsp; 1,227,386,315 bytes per MUT second<br><br>&nbsp; Productivity&nbsp; 65.7% of total user, 60.5% of total elapsed<br><br><br><br>One more thing to note: with partial parsing there is no longer a difference between mapM_ and mapMPar.<br>
<br>Best regards<br>Christopher Skrzêtnicki<br></div>