Converting Mercurial hgweb from CGI to WSGI
Angel Ezquerra
angel.ezquerra at gmail.com
Thu Aug 2 10:39:21 UTC 2012
On Thu, Aug 2, 2012 at 11:58 AM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 02/08/12 09:54, Angel Ezquerra wrote:
>>
>> If you serve many repositories, particularly if you use subrepos, _do
>> not_ use globs (particularly recursive globs) to specify them in your
>> "paths" section. Instead list each repository on your paths section
>> one by one.
>>
>> Mercurial currently looks for repos on every location that you specify
>> with a glob on your paths section _for every request_.
>
>
> hgweb should refresh regularly when using a long lived process
> (refreshinterval = 20 seconds) but not on every request.
>
> Scanning through the repo tree should however not be expensive ... unless
> you have huge working directories checket out. There is no reason for that
> ... and as you have found there is a good reason to not do that.
>
> /Mads
It is true that if you do not have huge working directories checked
out this should not be such a problem. Unfortunately that is not
something that I can enforce easily in our setup (for several, mostly
political reasons).
BTW, what do you mean by "long lived process". I got the impression
that when using CGI each request required a new execution of mercurial
on the server. Is that not the case? I do not know about
"refreshinterval" either. When you guys helped me improve the
performance of our server Matt himself told me that mercurial does a
repository search on every request (even when accessing a particular
repo). I may have misunderstood him, though.
Cheers,
Angel
More information about the Mercurial
mailing list