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

Na'Tosha Bard natosha at unity3d.com
Fri Oct 28 09:45:01 CDT 2011


2011/10/28 Dominik Psenner <dpsenner at gmail.com>

> >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.
>

I don't deny that your change speeds things up.  But it seems like we should
first check for a ".hglf" directory in the root of the repo, because this
also signifies that we need largefiles and is faster than walking the store
-- epsecially if the repo is large.  It won't help much in the
I-have-largefiles-enabled-but-don't-use-them case, but it will help in the
"I-do-have-largefiles-enabled-and-I-do-use-them" case.

Cheers,
Na'Tosha

-- 
*Na'Tosha Bard*
Build & Infrastructure Developer | Unity Technologies

*E-Mail:* natosha at unity3d.com
*Skype:* natosha.bard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111028/96250cc6/attachment.html>


More information about the Mercurial-devel mailing list