From f58f7b9a076444e05088186dde7b8703c4476761 Mon Sep 17 00:00:00 2001 From: Sam Betts Date: Thu, 5 May 2016 19:25:57 +0100 Subject: TinyIPA: Precompile python code for faster load This patch adds code into the tinyipa build process and IPA itself to allow the required python code to be PYTHONOPTIMIZE precompiled into pyo files, this speeds up IPA startup time in a nested virt by 50%. Change-Id: Ib60c420719ea52a602c1752b572d3b217c2cefc7 --- ironic_python_agent/api/app.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ironic_python_agent/api') diff --git a/ironic_python_agent/api/app.py b/ironic_python_agent/api/app.py index 5b560102..f9003e66 100644 --- a/ironic_python_agent/api/app.py +++ b/ironic_python_agent/api/app.py @@ -34,6 +34,7 @@ def get_pecan_config(): :returns: pecan configuration object. """ filename = config.__file__.replace('.pyc', '.py') + filename = filename.replace('.pyo', '.py') return pecan.configuration.conf_from_file(filename) -- cgit v1.2.1