Hello,<div><br></div><div>Today I was trying my test case on darcs-hs and noticed some stuff.  Here are my findings.</div><div><br></div><div>My test case is as follows:</div><div><br></div><div>Setup:</div><div>1) get the linux source repository (just using the tar ball)</div>
<div>2) darcs init</div><div>3) darcs add --recursive *</div><div><br></div><div>Test:</div><div>4) compile darcs and darcs-hs for profiling: in my path as darcs-prof and darcs-hs respectively</div><div><div>5a) echo q | darcs-prof +RTS -p -hc -sstderr -RTS record -m &quot;import&quot; 2&gt; darcs-prof.summary</div>
</div><div>5b) echo q | darcs-hs +RTS -p -hc -sstderr -RTS record -m &quot;import&quot; 2&gt; darcs-hs.summary</div><div>6a) hp2ps -c darcs-prof.hp</div><div>6b) hp2ps -c darcs-hs.hp</div><div>7) look at <a href="http://darcs-prof.ps">darcs-prof.ps</a>, darcs-prof.prof, and darcs-prof.summary (likewise for darcs-hs) to inspect the profiling data.</div>
<div><br></div><div>In addition to using -hc above, -hy is particularly helpful (gives you heap usage by data type), and -hm for break down by module.</div><div><br></div><div>Without making changes to darcs my test case runs in about 20 seconds and uses 450megs of physical ram and over a gig of virtual memory.  I&#39;ve been able to reduce this quite a lot with several experimental changes, but nothing to celebrate yet.</div>
<div><br></div><div>With darcs-hs the story is quite a bit different.  The physical ram usage is about 365megs, but the run time was around 100 seconds.</div><div><br></div><div>I&#39;m noticing the memory usage varies in darcs-hs quite a bit depending on the profiler options.  Running with -hm I&#39;m seeing it take about 250megs of physical ram.</div>
<div><br></div><div>I don&#39;t have a good baseline set of files to attach from regular darcs, but I have attached the profiling artifacts from darcs-hs so others can examine them.</div><div><br></div><div>In the attached .tar.gz file you should find:</div>
<div><a href="http://darcs-hs-hc.ps">darcs-hs-hc.ps</a> (profiled with -hc)</div><div><a href="http://darcs-hs-hy.ps">darcs-hs-hy.ps</a> (profiled with -hy)</div><div><a href="http://darcs-hs-hm.ps">darcs-hs-hm.ps</a> (profiled with -hm)</div>
<div>darcs-hs.prof (normal profiling summary)</div><div>darcs-hs.summary (GC summary)</div><div><br></div><div>I hope you find this useful.</div><div><br></div><div>Thanks,</div><div>Jason</div><div>PS I was going to add this to the wiki but I can no longer log in to the wiki, no idea why because no error is given.</div>
<div>PPS In both versions of darcs Darcs.Patch.FileName seems to be a memory hog.  I&#39;m still Investigating.</div>