Converting Mercurial hgweb from CGI to WSGI
Timm Aaron M
TimmAaronM at phoeintl.com
Thu Aug 2 14:47:58 UTC 2012
Angel
We too are serving several hundred repos and subrepos. The script idea you use sounds very useful. I was wondering if you could give any more detail on it. I don't completely understand the explanation you gave. Also, what time improvement did you see? Thanks.
-----Original Message-----
From: ezquerra at gmail.com [mailto:ezquerra at gmail.com] On Behalf Of Angel Ezquerra
Sent: Thursday, August 02, 2012 5:39 AM
To: Mads Kiilerich
Cc: Timm Aaron M; mercurial at selenic.com
Subject: Re: Converting Mercurial hgweb from CGI to WSGI
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