darcs performance

Simon Marlow simonmarhaskell at gmail.com
Mon Apr 2 04:07:32 EDT 2007


Ian Lynagh wrote:
> On Sun, Apr 01, 2007 at 01:23:32PM +0200, Sven Panne wrote:
>> When getting a repo via HTTP, darcs seems to be *much* faster than via SSH. 
>> Here as an example the cpphs repo, 3.7 patches per second vs. 0.7 patches per 
>> second (almost unusable for large/old repos):
>>
>> 5. :-( Is there a misconfiguration on my box or does this happen for other 
>> people, too? I'm using darcs 1.0.8 on openSUSE 10.2 x86_64.
> 
> darcs over SSH is slower for me too.
> 
> I have
> 
>     pull no-set-default
>     push no-set-default
> 
> in ~/.darcs/defaults, and then do
> 
>     darcs push da<tab>
> 
> which magically tab completes to, e.g.,
> 
>     darcs push darcs.haskell.org:/home/darcs/ghc

Since we're all demonstrating our local darcs hacks, here's mine: I use HTTP for 
get/pull, and I have a script (attached) that grovels in _darcs/prefs/repos to 
find the right place to push to and then pushes over SSH.

Cheers,
	Simon
-------------- next part --------------
#! /bin/sh

d=`pwd`
while [ "$d" != "" ]; do
  if [ -d $d/_darcs ]; then break; fi
  d=`dirname $d`
done

if [ "$d" = "" ]; then
  echo darcs reopsitory not found
  exit 1
fi

repo=`grep http://darcs.haskell.org $d/_darcs/prefs/repos | head -n 1 | sed 's|^http://darcs.haskell.org/||'`

if [ "$repo" = "" ]; then
  echo darcs.haskell.org repo not found in $d/_darcs/prefs/repos
  exit 1
fi

if [ "$LOGNAME" = "" ]; then
   if [ "$USERNAME" = "" ]; then
      echo $LOGNAME and $USERNAME both empty; I don\'t know what username to use
      exit 1
   fi
   LOGNAME=$USERNAME
fi  

echo darcs push $* --no-set-default ${LOGNAME}@darcs.haskell.org:/home/darcs/$repo
darcs push $* --no-set-default ${LOGNAME}@darcs.haskell.org:/home/darcs/$repo


More information about the Cvs-ghc mailing list