[darcs-users] gitit disabled for now

Bertram Felgenhauer int-e at gmx.de
Sun Apr 19 14:45:46 UTC 2009


Gwern Branwen wrote:
> Why is changes on a file so drastically slow sometimes? Why is it
> slower to ask for changes about a particular file than for every
> change?

To list all changes, it's enough to read the inventory (assuming you
don't use -v or -s with darcs changes). If you look for changes to a
particular file, you have to actually parse the patches.

> Here's some more mystifying output:
> 
> gitit at darcs:~/DarcsWiki$ for file in *; do time darcs changes
> - --xml-output $file > /dev/null;done
> 
> real	0m2.330s
> user	0m1.948s
> sys	0m0.360s
>
> real	0m3.269s
> user	0m2.540s
> sys	0m0.524s
> 
> real	0m1.848s
> user	0m1.548s
> sys	0m0.284s
>
> real	0m18.052s
> user	0m2.284s
> sys	0m0.436s
> 
> What is this? Darcs is cached, presumably much of the repo is cached
> and available. What could lead to a difference of 16 seconds or more
> than 8x?

Simple (although it probably doesn't explain the 18 seconds case - note
that most of the time is neither user nor system time): Darcs stops
looking for patches once it finds the patch that originally created
the file:

    # darcs init
    # echo 1 > x; darcs record -a -l -m 'add x'
    Finished recording patch 'add x'
    # rm x; darcs record -a -l -m 'remove x'
    Finished recording patch 'remove x'
    # echo 2 > x; darcs record -a -l -m 'add x again'
    Finished recording patch 'add x again'

Ask for changes to x:

    # darcs changes x
    Changes to x:
    
    Sun Apr 19 16:33:00 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * add x again

as opposed to
    
    # darcs changes
    Sun Apr 19 16:33:00 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * add x again
    
    Sun Apr 19 16:32:54 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * remove x
    
    Sun Apr 19 16:32:44 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * add x

I guess this is a feature, not a bug, because it's related to tracking
renames in darcs changes:

    # darcs init
    # echo 1 > y; darcs record -a -l -m 'add y'
    Finished recording patch 'add y'
    # echo 2 > y; darcs record -a -l -m 'change y'
    Finished recording patch 'change y'
    # darcs mv y x; darcs record -a -l -m 'rename y to x'
    Finished recording patch 'rename y to x'

    # darcs changes x
    Changes to x:
    
    Sun Apr 19 16:39:50 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * rename y to x
    
    Sun Apr 19 16:39:50 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * change y
    
    Sun Apr 19 16:39:50 CEST 2009  Bertram Felgenhauer <int-e at gmx.de>
      * add y

Bertram


More information about the darcs-users mailing list