Message7059
As discussed with Ralf Schlatterbeck we should add the tracker
initialization to the init function of the class RoundupDispatcher.
Otherwise compilation of TAL templates and loading of python modules
and libraries happends during the first request to Roundup.
This issue poped up during experimentation with pre-loading and lazy
loading of WSGI processes with Apache. With this patch the request time
for a rest api call from the first request dropped down from 2 seconds
to 450ms.
diff --git a/roundup/cgi/wsgi_handler.py b/roundup/cgi/wsgi_handler.py
index 767221ac..ef4547a1 100644
--- a/roundup/cgi/wsgi_handler.py
+++ b/roundup/cgi/wsgi_handler.py
@@ -84,6 +84,9 @@ class RequestDispatcher(object):
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""" |
|
Date |
User |
Action |
Args |
2021-02-02 14:45:21 | tttech-klonner | set | recipients:
+ tttech-klonner |
2021-02-02 14:45:21 | tttech-klonner | set | messageid: <1612277121.45.0.147538139226.issue2551112@roundup.psfhosted.org> |
2021-02-02 14:45:21 | tttech-klonner | link | issue2551112 messages |
2021-02-02 14:45:21 | tttech-klonner | create | |
|