darcs

Issue 1938 "darcs add" performance regression

Title "darcs add" performance regression
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List dastapov, dmitry.kurochkin, mornfall
Assigned To
Topics Hashed, Performance, Regression

Created on 2010-09-01.11:45:14 by igloo, last changed 2017-07-31.00:25:16 by gh.

Messages
msg12388 (view) Author: igloo Date: 2010-09-01.11:45:13
darcs2 is slower at "darcs add" on a hashed repo (~1s) than darcs1 is on
an OF repo (~0.01s). darcs2 is even slower on an OF repo (~10s).

This is with the GHC testsuite repo, http://darcs.haskell.org/testsuite/

$ darcs get testsuite d1
Copying patch 3938 of 3938... done!
Finished getting.
$ darcs2 get testsuite d2 --hashed
Converting old-fashioned repository to hashed format...
*******************************************************************************
Fetching a hashed repository would be faster.  Perhaps you could persuade
the maintainer to run darcs optimize --upgrade with darcs 2.4.0 or higher?
*******************************************************************************
Finished getting.

Warning: CRC errors found. These are probably harmless but should be
repaired.
See 'darcs gzcrcs --help' for more information.

$ cd d1
$ touch foo1 foo2 foo3 foo4 foo5
$ time darcs add foo1
darcs add foo1  0.00s user 0.01s system 16% cpu 0.049 total
$ time darcs add foo2
darcs add foo2  0.00s user 0.00s system 69% cpu 0.012 total
$ time darcs add foo3
darcs add foo3  0.00s user 0.00s system 69% cpu 0.012 total
$ time darcs add foo4
darcs add foo4  0.00s user 0.00s system 69% cpu 0.012 total
$ time darcs add foo5
darcs add foo5  0.01s user 0.00s system 102% cpu 0.012 total
$ rm _darcs/patches/pending 
$ time darcs2 add foo1     
darcs2 add foo1  9.97s user 0.23s system 99% cpu 10.246 total
$ time darcs2 add foo2
darcs2 add foo2  9.14s user 0.23s system 99% cpu 9.414 total
$ time darcs2 add foo3
darcs2 add foo3  9.92s user 0.25s system 99% cpu 10.171 total
$ time darcs2 add foo4
darcs2 add foo4  9.03s user 0.30s system 99% cpu 9.337 total
$ time darcs2 add foo5
darcs2 add foo5  9.80s user 0.26s system 99% cpu 10.061 total
$ cd ..
$ cd d2
$ touch foo1 foo2 foo3 foo4 foo5
$ time darcs2 add foo1
darcs2 add foo1  1.20s user 0.16s system 99% cpu 1.363 total
$ time darcs2 add foo2
darcs2 add foo2  0.85s user 0.12s system 99% cpu 0.977 total
$ time darcs2 add foo3
darcs2 add foo3  0.87s user 0.09s system 98% cpu 0.973 total
$ time darcs2 add foo4
darcs2 add foo4  0.81s user 0.11s system 99% cpu 0.925 total
$ time darcs2 add foo5
darcs2 add foo5  0.86s user 0.10s system 98% cpu 0.972 total
$ darcs --version
1.0.9rc1 (release candidate 1)
$ darcs2 --version
2.4.3 (release)
$ darcs2 show repo        
          Type: darcs
        Format: hashed
          Root: /home/ian/ghc/darcs/ghc/d2
      Pristine: HashedPristine
         Cache: thisrepo:/home/ian/ghc/darcs/ghc/d2,
cache:/home/ian/.darcs/cache
boringfile Pref: .darcs-boring
Default Remote: /home/ian/ghc/darcs/ghc/testsuite
   Num Patches: 3938
$ darcs2 show files | wc -l
5967
msg12403 (view) Author: kowey Date: 2010-09-02.08:45:44
We need: diagnosis (adding Petr to this because he was discussing the 
matter with Ian on IRC), and also an implementation of bug #c3b/6da in 
darcs-benchmark (benchmark for darcs add)
msg14541 (view) Author: galbolle Date: 2011-06-17.09:53:26
for what it's worth, darcs-2.5 seems to be acceptably fast (~0.1s), but
darcs 2.7.3 needs about .4s for 1 file, and 1s for 1000 files.
History
Date User Action Args
2010-09-01 11:45:14igloocreate
2010-09-01 14:56:18dastapovsetnosy: + dastapov
2010-09-02 08:45:47koweysetpriority: bug
status: unknown -> needs-reproduction
topic: + Performance, Regression, Hashed
messages: + msg12403
nosy: + mornfall
2011-06-17 09:53:27galbollesetmessages: + msg14541
2017-07-31 00:25:16ghsetstatus: needs-reproduction -> given-up