view frontends/wsgi.py @ 6747:d32d43e4a5ba

wsgi can cache tracker instance enabled by feature flag. Patch by Marcus Priesch caches a loaded tracker instance and reuse it for future client sessions. It is enabled by a feature flag in wsgi.py since it arrived during the 2.2.0 beta period. The provided wsgi.py is modified to enable it. Testing is run with flag enabled and disabled. Ralf Schlatterbeck and Marcus tested it on one of their larger more complex trackers and it sped up the response time to a client request by a factor of 3 (270ms down to about 80-85ms).
author John Rouillard <rouilj@ieee.org>
date Sat, 02 Jul 2022 14:04:00 -0400
parents 7c852cad2ca8
children fde9fe504ebd
line wrap: on
line source

# If you installed roundup to the system locations
# using pip you don't need to change this
# section. If you installed roundup in a custom
# location, uncomment these lines and change the
# path in the append() method to your custom path.
#import sys
#sys.path.append('/custom/location/where/roundup/is/installed')

# Obtain the WSGI request dispatcher
from roundup.cgi.wsgi_handler import RequestDispatcher

# Set the path to tracker home.
tracker_home = '/path/to/tracker'

# Enable the feature flag to speed up wsgi response by caching the
#   Roundup tracker instance on startup. See upgrading.txt for
#   more info.
feature_flags =  { "cache_tracker": "" }

# Definition signature for app: app(environ, start_response):
app =  RequestDispatcher(tracker_home= feature_flags=feature_flags)

Roundup Issue Tracker: http://roundup-tracker.org/