summaryrefslogtreecommitdiff
path: root/ironic_python_agent/api
diff options
context:
space:
mode:
authorSam Betts <sam@code-smash.net>2016-05-05 19:25:57 +0100
committerSam Betts <sam@code-smash.net>2016-05-11 18:58:57 +0100
commitf58f7b9a076444e05088186dde7b8703c4476761 (patch)
treed49186121f84ec6825efbb5851dd3e808f030670 /ironic_python_agent/api
parent7274e2ee81e28c36988873f77f0da30b06e072e1 (diff)
downloadironic-python-agent-f58f7b9a076444e05088186dde7b8703c4476761.tar.gz
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
Diffstat (limited to 'ironic_python_agent/api')
-rw-r--r--ironic_python_agent/api/app.py1
1 files changed, 1 insertions, 0 deletions
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)