[darcs-users] soc progress 4

Petr Rockai me at mornfall.net
Wed Jun 17 16:35:28 UTC 2009


I have slipped the report a day, but yesterday I was mostly engaged in studying
various proofs in Petri Net theory for today's exam. Everything went well as
far as I can tell, although I'll be only to tell when the test is corrected.

Anyway, I have done some work despite study for exams being a massive
timesink. Moreover, a lot of time went into chasing ghosts, unfortunately. The
performance regression I have mentioned last time turned out to be not really a
performance regression, more an oddity in the behaviour of my CPU frequency
scaling... it managed to get stuck at 800MHz from time to time, doubling the
time needed to do a darcs whatsnew. It wouldn't be so bad if it kept stuck
there, but it non-deterministically managed to get unstuck from time to time,
so after some changes I made to the source, the performance suddenly jumped
back to original numbers, even though it didn't make any sense. After few hours
of cursing Haskell in general and GHC in particular, I have figured that both
are innocent. So much for the regression. At least I took the opportunity and
cleaned up and refactored the Tree unfold function (which still needs to be
renamed. Noting among things that need to be done before freeze...).

Other than that, I have looked into the `darcs wh path` slowness and managed to
come up with a reasonable fix, involving creative use of the TreeIO monad from
hashed-storage. The numbers from ghc-testsuite hashed repository are these:

    darcs-2.2 wh        0,92s user 0,14s system 98% cpu 1,082 total
    darcs-2.2 wh mk     0,20s user 0,02s system 90% cpu 0,246 total

    darcs wh            0,06s user 0,04s system 94% cpu 0,105 total
    darcs wh mk         0,02s user 0,00s system 94% cpu 0,021 total

Changes for this week... hashed-storage:

  * Make lcs an optional dependency (use -fdiff to get the Diff module).
  * Refactor and beautify Tree unfold.
  * Use mmap instead of bytestring-mmap in readSegment (in Utils).
  * Cut down build-depends (no longer need bytestring-mmap nor binary).
  * Add fileExists and exists to Monad (unlike find*, these will unfold as needed).

... and darcs-hs:

  * Use the mmap package instead of bytestring-mmap.
  * The hashed-storage index functions take a filename now.
  * Use index-based diffing in Record.
  * Use local pendingChanges instead of read_pending, in readRecordedAndPending.
  * Explicit import list for Storage.Hashed.Monad in Gorsvet.
  * Optimise the file existence checking in whatsnew <files>.

I am now off to play some bassoon and right after that I'll finally have darcs
hacking time. I guess some administrativia is in place (sending the outstanding
patches to darcs-users@) and then I'll probably focus on something lighter,
like adding `darcs show index` to darcs-hs, so I get back into darcs context.


Petr Ročkai | http://web.mornfall.net
A physicist is an atom's way of knowing about atoms. (George Wald)

More information about the darcs-users mailing list