checkrequireslfiles causes very slow push with large repo store

olivier.trempe at nobelbiocare.com olivier.trempe at nobelbiocare.com
Thu Dec 27 07:27:55 CST 2012


We need to have largefiles enabled to bypass the list generation in this 
condition:

if 'largefiles' not in repo.requirements and util.any(lfutil.shortname+'/' 
in f[0] for f in repo.store.datafiles()):

so when it sees largefiles, the first condition is false and it doesn't 
execute the second condition which slowly builds the list.

Actually, having largefiles enabled fix the problem even if the repo 
doesn't really require largefiles.

Olivier Trempe


From:   Mads Kiilerich <mads at kiilerich.com>
To:     olivier.trempe at nobelbiocare.com
Cc:     mercurial-devel at selenic.com
Date:   21/12/2012 17:48
Subject:        Re: checkrequireslfiles causes very slow push with large 
repo store



olivier.trempe at nobelbiocare.com wrote, On 12/21/2012 06:08 PM:
> Hello,
>
> Our repo store contains 22659 entries. Pushes to remo repo are very 
> slow and I narrowed it down to this method:
>
> 
C:\Python27\Lib\site-packages\hgext\largefiles\reposetup.py:reposetup.checkrequireslfiles() 

>
>
> If your repo doesn't require largefiles, this method builds a list by 
> walking the repo store:
>
> util.any(*lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()*)

Yeah, that code is both slow and incorrect, but there is no obvious 
elegant way of doing it.

But why do you have largefiles enabled if you don't use it? The best 
workaround might be to avoid setting it globally and only set it in the 
repos where you need it ... or explicitly disable it in the repos where 
you don't need it.

> Should I submit this to http://bz.selenic.com?

You could do that.

/Mads

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121227/02b764b5/attachment.html>


More information about the Mercurial-devel mailing list