[darcs-users] another darcs-wiki-on-gitit demo

Trent W. Buck trentbuck at gmail.com
Fri Apr 17 03:15:39 UTC 2009


John MacFarlane <fiddlosopher at gmail.com> writes:

> I think the difference might be attributable to inefficiencies in
> darcs filestore.  Currently the command to get information on the
> latest revision has to parse the entire output of 'darcs changes',
> which is pretty long for your wiki.  It seems there is no way to
> get 'darcs changes' to return just the most recent change that
> touches a specified file.  (You'd think '--last=1' would do this,
> but it doesn't -- it seems to count back in the global patch
> stack, rather than in the patches that touch the specified file.)

I added a tag to the darcs-wiki repo, "2009-03 moin import".  This tag
includes the moin history, but none of the moin->rest syntax transition.

We can then use --from-tag "2009-03 moin import".  Like --last=1, this
will reduce the number of patches Darcs emits (from about 3900 to about
160).  Because every file was touched by the syntax mangling, it should
still be safe.

I worked out that I could use _darcs/prefs/defaults to add --from-tag
without recompiling gitit.  I tried this, but results were poor, so I
have backed the changes out.  Here are the timings:

    $ time darcs changes --xml | wc -l
    15169
    real    0m1.879s
    user    0m1.752s
    sys     0m0.104s
    $ time sh -c 'for i in `seq 10`; do wget -qO /dev/null http://127.0.0.1:5001/; done'
    real    1m8.239s

    ## Now suppress the moin history...
    $ echo >>_darcs/prefs/defaults changes from-tag 2009-03 moin import
    $ time darcs changes --xml | wc -l
    677
    real    0m3.338s
    user    0m3.216s
    sys     0m0.096s
    $ time sh -c 'for i in `seq 10`; do wget -qO /dev/null http://127.0.0.1:5001/; done'
    real    1m10.460s

WTF?  Why should "darcs changes" be *slower* with a --from-tag, and why
has there been no effect on gitit?  With several timings (not shown),
it's clear the gitit test varies by ±5s regardless of --from-tag.



More information about the darcs-users mailing list