diff --git a/etc/trytond.conf b/etc/trytond.conf index df5c29915a..e03c81f848 100644 --- a/etc/trytond.conf +++ b/etc/trytond.conf @@ -60,3 +60,7 @@ max_thread = 40 # Configure the session timeout (inactivity of the client in sec) #session_timeout = 600 + +# Enable psyco module +# Need to have psyco installed http://psyco.sourceforge.net/ +#psyco = False diff --git a/trytond/config.py b/trytond/config.py index 1efc11b116..cdbffd3972 100644 --- a/trytond/config.py +++ b/trytond/config.py @@ -35,6 +35,7 @@ class ConfigManager(object): 'max_thread': 40, 'multi_server': False, 'session_timeout': 600, + 'psyco': False, } parser = optparse.OptionParser(version=VERSION) diff --git a/trytond/server.py b/trytond/server.py index 897fc73a8d..cf8ff0b650 100644 --- a/trytond/server.py +++ b/trytond/server.py @@ -236,12 +236,9 @@ class TrytonServer(object): webdavd.start() #DISPATCHER.run() - #TODO add an option for psyco - #try: - # import psyco - # psyco.full() - #except ImportError: - # pass + if CONFIG['psyco']: + import psyco + psyco.full() now = time.time() while True: