[PATCH 0 of 3] log: speed up hg log for untracked files

S Muralidhar smuralid at yahoo.com
Thu Sep 13 12:41:25 CDT 2012


This patch series is an attempt to speed up hg log for untracked files. 

The first two patches add methods to the different stores (basicstore and fncachestore) to quickly check if the store knows about a given path. The third patch uses this method to see if a file with no revlog is not a directory, in which case the slowpath can be avoided.

Timings: The following are the hg log timings on a few files/dirs in my hg repo before and after this change.

Existing file: hg log i-l1 --time README
  Before: real 0.030 secs
  After:  real 0.030 secs

Non-existing file: hg log -l1 --time abc
  Before: real 1.390 secs
  After:  real 0.030 secs

Existing directory: hg log -l1 --time mercurial
  Before: real 1.450 secs
  After:  real 1.450 secs

So, hg log on untracked files is much faster now. The other timings stay the same (hg log on directories is still slow, but that's another problem to tackle)


More information about the Mercurial-devel mailing list