[PATCH] alternate implementation of adding archives to hgwebdir index page
Alexis S. L. Carvalho
alexis at cecm.usp.br
Fri Apr 28 12:22:07 UTC 2006
Thus spake Colin McMillen:
> > > It has the
> > > advantage of looking at each repo's .hgrc to see which archive types
> > > should be enabled (so the behavior is consistent with the archive
> > > links provided by hgweb).
> >
> > this is very good idea.
> >
> > > It has the (minor) disadvantage of needing
> > > to create hgweb objects for each of the repos. Choose whichever one
> > > you like... :)
> >
> > sorry, this is major disadvantage. i have 90 repos served by hgwebdir.
> > creation of entire localrepository object for each repo every time
> > someone visits index page makes index page very slow to load, burns
> > lot of cpu cycles.
> >
> > please find other way to do this. i like idea of not writing duplicate
> > code, but performance hit is very really big here.
>
> How about a compromise, similar to the global MOTD:
>
> in hgweb.config, if
>
> [web]
> allowgz = True
>
> is present, .gz files will be offered for all repos on the main page.
>
> (Same for zip and bz, obviously).
AFAICS, you're creating an hgweb object just to call its archivelist
method. Since it's a pretty simple function, you can probably either
duplicate it, or change it into a global helper function.
Alexis
More information about the Mercurial
mailing list