[darcs-users] Benchmarking "get"

Stephen J. Turnbull stephen at xemacs.org
Mon Mar 16 04:10:16 UTC 2009


Max Battcher writes:

 > [git] is indeed slower in HTTP gets than darcs 2 with
 > hashed/darcs-2 repos,

That's good progress for Darcs, though not particularly surprising to
me now that the pipelining feature has stabilized.  Note that serious
public git repos (well, at least git.kernel.org and github) use the
git protocol, not HTTP, which is also noticably faster than git HTTP
gets.

 > which was my own surmise given anecdotal experience.  I didn't think to 
 > try a git fast-import of the same repo to do a similar<->similar repo 
 > experiment as you have. Thanks.
 > 
 > I seriously believe that most git users are hugely underestimating the 
 > speeds of their git operations... 

(Oops, parity error.  -> underestimate time cost or overestimate speed)

Don't kid yourself.  git is so fast that I've added an after-save-hook
in Emacs that autocommits *every* time a git-controlled file is saved,
and its activity is imperceptible except for the text update in the
*Shell Command Output* buffer.  And many is the time it has saved me
minutes of thought trying to reconstruct an interrupted thought
process.  The relevant diff is also only a click away in gitk, and
(after 2s for Tcl/Tk to get the window up and load the DAG in the
first place) that too is instantaneous.  I'm not seeing the myriad
commits in the df stats, even.

Then (if needed) git rebase --interactive is not as nice as darcs
record by a long shot, but it's bearable.  Mostly though I use

git-abbreviate-microcommits () {
  if test -n "$1"; then branch=master; else branch=$1; fi
  git-reparent autocommit $branch  # a script using git-filter-branch
  git checkout $branch
  git merge --no-log --no-commit autocommit   # guaranteed fast-forward
  git commit --edit
  git checkout autocommit          # all history is available until
                                   # git-gc --prune, but less accessible
}

which takes an imperceptible amount of time, and back to work.

git is not for everybody, for all the well-known reasons.  But again,
don't kid yourself, git really is that fast in day-to-day operation.
Except for git clone on a remote repo, git almost never takes as much
time to execute a command as it takes me to formulate and type it.
That's as fast as anything *ever* gets.


More information about the darcs-users mailing list