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