[darcs-users] darcs-benchmark

Zooko Wilcox-O'Hearn zooko at zooko.com
Mon Oct 19 18:19:01 UTC 2009


Folks:

Here is a "real world" situation where darcs is too slow for my use.   
If you go to this URL:

http://allmydata.org/trac/cryptopp/changeset/324

Then Trac and the Trac-Darcs plugin will invoke the following command  
for *every* file that was touched in that patch:

2009-10-19 11:09:35,311 Trac[command] DEBUG: cd /home/source/darcs/ 
cryptopp/trunk; TZ=UTC darcs query contents --quiet --match "hash  
20070504153615-e3536-1a10ecb2c4ac6d0300297252c037ea54db454460.gz" "c5/ 
salsa.h"
2009-10-19 11:09:37,843 Trac[command] DEBUG: cd /home/source/darcs/ 
cryptopp/trunk; TZ=UTC darcs query contents --quiet --match "hash  
20080202083821-e3536-5597696896396700e0e1f56c3ec3087ea6eae5e9.gz" "c5/ 
salsa.h"
2009-10-19 11:09:39,232 Trac[command] DEBUG: cd /home/source/darcs/ 
cryptopp/trunk; TZ=UTC darcs query contents --quiet "c5/pubkey.h"
2009-10-19 11:09:39,296 Trac[command] DEBUG: cd /home/source/darcs/ 
cryptopp/trunk; TZ=UTC darcs query contents --quiet "c5/randpool.cpp"
2009-10-19 11:09:39,351 Trac[command] DEBUG: cd /home/source/darcs/ 
cryptopp/trunk; TZ=UTC darcs query contents --quiet "c5/randpool.h"

This takes way too long and Trac incurs a 30-second time-out and  
generates an error before this process is finished.

I think that Trac-Darcs nowadays optimizes by not using --match if  
the version it is interested in is also the most recent version.  As  
you can see from this excerpt above, the ones without --match take  
about 0.06 seconds and the ones with --match take about 2.5 seconds.   
(I guess this latter number should vary based on how many patches  
back is the patch named in the match clause.)

So, it might be possible for Trac-Darcs to be even cleverer to  
optimize this sort of thing, but something that darcs could do better  
would be to optimize this "darcs query contents --match" operation.

Thanks!

Regards,

Zooko


More information about the darcs-users mailing list