I wrote a (write-only) script that measures the impact of patch index on medium-sized repositories (1000 patches).
Here's what the script successively does:
- generate 500 random files of 2 KBytes each, and an empty file named
- add all of this as an first patch of an empty repository (1)
- create 1000 successive patches, each one made of changing the contents of
footo a random line of 80 characters (2)
- amend 100 times the last patch of the repository by changing the contents of
footo a random line of 80 characters (3)
- obliterate the last 100 patches of the repository (4)
It does it first on a repository made with
init --disable-patch-index, then with a new one made with
The duration of each step are the following (in seconds):
add_disable-patch-index 2.82 add_patch-index 2.40 record_disable-patch-index 243.73 record_patch-index 1635.95 amend_disable-patch-index 55.83 amend_patch-index 329.87 obliterate_disable-patch-index 48.81 obliterate_patch-index 183.61
Running the script takes approx. 45 minutes on my machine.
The most worrying figures are those of record and amend. It would be really great if we could fix this by darcs 2.10, otherwise I fear that's going to be another feature we will have to disable by default.
Attached is my script (and its subscripts). Probably not portable, I does run under Ubuntu. Run it with
./benchpatchindex.sh , with all the other scripts in the same directory. I may polish the script further so that it outputs nice charts.