[darcs-devel] Repository.writePatch (issue80)

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Mon Jan 16 08:21:15 PST 2006


> I suspect that there is also a space leak in gzReadPatchFileLazily.

``Retainer'' is the politically-correct term in Haskell-land.

> Who knows, I've looked at it some, but I'm making little or no
> progress and the trouble shooting feels like voodoo so far (just
> making changes without an understanding).

Use GHC's space profiler, which unlike the time profiler appears to be
reasonably reliable.  (The time profiler does work, but interpreting
the results takes a lot of guessw^Wexperience.)

Compile with -prof -auto-all.  Then run darcs with

  +RTS -hc -RTS

and run hp2ps on the resulting file.  It will generate a pretty picture
which you'll probably spend some time staring at.  I usually do, at
any rate.

Warning: do not do that if you intend to go out that evening.  You'll
probably spend the rest of the day and part of the night tweaking darcs
and profiling.

You might also check the GHC manual to see whether you manage to work
out what the -hr option does.  If you do, please explain it to me.

                                        Juliusz




More information about the darcs-devel mailing list