[PATCH] hgwebdir: return memory to the OS after each request

Antoine Pitrou solipsis at pitrou.net
Mon Jul 2 20:07:21 CDT 2012


On Tue, 03 Jul 2012 01:12:06 +0200
Antoine Pitrou <solipsis at pitrou.net> wrote:
>                              repo = hg.repository(self.ui, real)
> -                            return hgweb(repo).run_wsgi(req)
> +                            try:
> +                                return hgweb(repo).run_wsgi(req)
> +                            finally:
> +                                repo.invalidate()
> +                                gc.collect()

It's probably better to release the repo object before calling
gc.object(). Will submit a new patch.

Regards

Antoine.




More information about the Mercurial-devel mailing list