Mercurial > p > roundup > code
diff roundup/cgi/wsgi_handler.py @ 6321:979cecdb70f8
Pre-load imports and templates for wsgi
This triggers preloading once in __init__ doing essentially the same
thing as in __call__. This avoids burdening the first request with the
startup cost. Fixes issue2551112.
Thanks to Robert Klonner for the patch.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Wed, 03 Feb 2021 17:53:55 +0100 |
| parents | 3cba8949bfe0 |
| children | 0343b6fea4b9 |
line wrap: on
line diff
--- a/roundup/cgi/wsgi_handler.py Fri Jan 15 16:41:31 2021 -0500 +++ b/roundup/cgi/wsgi_handler.py Wed Feb 03 17:53:55 2021 +0100 @@ -84,6 +84,9 @@ tracker_home=home) else: self.translator = None + # trigger pre-loading of imports and templates + with self.get_tracker(): + pass def __call__(self, environ, start_response): """Initialize with `apache.Request` object"""
