[PATCH RESEND] largefiles: speed up the check if largefiles should be added to repo requirements

Dominik Psenner dpsenner at gmail.com
Fri Oct 28 08:52:58 CDT 2011


>Wouldn't it also be logical to first just check for a ".hglf" in the repo
>directory, and only if it doesn't exist, walk the repo.store?  Surely this
>is much faster?

I'm hacking on windows right now, thus I cannot compare performance as I
lack "time". But it surely feels a lot faster. Feel free to apply the patch
on the current tip of stable (b26315ae7f18) and test it with:

$ time hg tip -q
$ time hg tip -q --config extensions.largefiles=

The speedup should match exactly the factor:

`ls .hg/store/data/* | wc -l` / `find .hg/store/data | wc -l`

I also thought of even doing an atomic file exists check, but was afraid of
that after all.

Cheers,
Dominik



More information about the Mercurial-devel mailing list