Just a reminder: Mercurial repository clones get slower over time. It’s worth deleting and recloning every so often.
For example, I had one old repository that I’d done a lot of work in and updated many times. It had a patch queue containing a single patch. I tried doing hg qdiff
four times in a row. The first one took 65 seconds, and the next three each took 16 seconds.
I deleted the repository, re-cloned, re-applied the patch, and hg qdiff
now takes 1 second. Much better.
6 replies on “Speeding up Mercurial”
Do you also get the same performance improvement by locally cloning a repository? It should be faster to clone locally than having to download all the repository.
Yes, my reclone was local, from another local repo clone that I had.
Maybe something like “git gc” would help?
Have you filed a bug? This is very weird.
Related to old repository formats? ( http://www.selenic.com/mercurial/hgrc.5.html#format ) With which version of Mercurial was your old repository created with?
Or disk fragmentation?
I’m using 1.9.1 and created the repo with that version, so that shouldn’t be relevant, judging from that link.
I guess disk fragmentation is at least part of the story.