Why is hg identify so slow?

Frank Kingswood frank at kingswood-consulting.co.uk
Wed Jun 25 05:53:43 CDT 2008


Hallo!

I've noticed several times in the past that hg identify is quite slow 
compared to hg status. It would seem to me that hg identify actually has 
slightly less to do - no need to print out modified or unknown files.

Here are some times for hg identify, starting with a cold cache:

$ /usr/bin/time hg identify
10c2ba2b7943 tip
0.66user 0.17system 0:04.13elapsed 20%CPU
0inputs+0outputs (0major+7035minor)pagefaults 0swaps
$ /usr/bin/time hg identify
10c2ba2b7943 tip
0.64user 0.07system 0:01.03elapsed 69%CPU
0inputs+0outputs (0major+7033minor)pagefaults 0swaps


and for hg status:

$ /usr/bin/time hg status
0.20user 0.14system 0:03.48elapsed 9%CPU
0inputs+0outputs (0major+2281minor)pagefaults 0swaps
$ /usr/bin/time hg status
0.19user 0.06system 0:00.43elapsed 60%CPU
0inputs+0outputs (0major+2280minor)pagefaults 0swaps


In the best case, hg identify is more than twice as slow as hg status.

My repository's .hg directory is about 500MB, the working copy 1GB, and 
it lives on NFS.

Frank


More information about the Mercurial-devel mailing list