[darcs-devel] patch index performance impact on add, record, amend, obliterate

Guillaume Hoffmann guillaumh at gmail.com
Sun Feb 24 22:25:52 UTC 2013


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 `foo`
* 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 `foo` to a random line of 80 characters (2)
* amend 100 times the last patch of the repository by changing the
contents of `foo` to 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 `init
--patch-index`.

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.

Guillaume
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amendlotspatches.sh
Type: application/x-sh
Size: 225 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20130224/a0e7c2ad/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obliteratelotspatches.sh
Type: application/x-sh
Size: 100 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20130224/a0e7c2ad/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recordlotspatches.sh
Type: application/x-sh
Size: 231 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20130224/a0e7c2ad/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchpatchindex.sh
Type: application/x-sh
Size: 1366 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20130224/a0e7c2ad/attachment-0003.sh>


More information about the darcs-devel mailing list