)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"29ebf8ad613e22c2c0a462792d887d01fbe4cb6d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code into the tinyipa build process and IPA itself to"},{"line_number":10,"context_line":"allow the required python code to be PYTHONOPTIMIZE precompiled into"},{"line_number":11,"context_line":"pyo files, this speeds up IPA startup time in a nested virt by 50%."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib60c420719ea52a602c1752b572d3b217c2cefc7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_486f5ac5","line":11,"updated":"2016-05-08 15:23:46.000000000","message":"Pretty suprising, Python optimization does not do much.. maybe file size is important here.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"374564a216fbc57da03ee2efa389e5d498a30c23","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code into the tinyipa build process and IPA itself to"},{"line_number":10,"context_line":"allow the required python code to be PYTHONOPTIMIZE precompiled into"},{"line_number":11,"context_line":"pyo files, this speeds up IPA startup time in a nested virt by 50%."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib60c420719ea52a602c1752b572d3b217c2cefc7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_c050350d","line":11,"in_reply_to":"dab17558_486f5ac5","updated":"2016-05-09 10:06:21.000000000","message":"I\u0027d expect almost as much of a speedup from precompiling to .pyc files, but I don\u0027t think we actually tested that: AFAICT the time we\u0027re saving would be spent parsing and bytecode-compiling all the dependencies. The difference in file size between compiled and uncompiled libraries is only ~10%.\n\nFile size does make a huge difference to the speed of the TFTP transfer, though.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3f92265ffef12fd478249993810e23da030f7671","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds code into the tinyipa build process and IPA itself to"},{"line_number":10,"context_line":"allow the required python code to be PYTHONOPTIMIZE precompiled into"},{"line_number":11,"context_line":"pyo files, this speeds up IPA startup time in a nested virt by 50%."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib60c420719ea52a602c1752b572d3b217c2cefc7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_ff786b2d","line":11,"in_reply_to":"dab17558_c050350d","updated":"2016-05-09 15:35:12.000000000","message":"During testing getting from calling the ironic-python-agent command to IPA actually starting to run took 25+ seconds, with the longest part of the starting process being importing all the dependencies with the worse offenders being:\n\nfrom oslo_config import cfg \n\nand\n\nfrom ironic_python_agent import agent\n\ntaking ~8 seconds each.\n\nCompiling to pyo and ensuring that python uses the pyo files, saved \u003e50% on IPA load time, reducing time from the ironic-python-agent command to start down to ~10seconds.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"}],"imagebuild/tinyipa/build_files/bootlocal.sh":[{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"9aa5f92082c2e03733427da95046c26d061b0b73","unresolved":false,"context_lines":[{"line_number":20,"context_line":"export PYTHONOPTIMIZE\u003d1"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Run IPA"},{"line_number":23,"context_line":"date"},{"line_number":24,"context_line":"ironic-python-agent"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_ad2281b7","line":23,"updated":"2016-05-06 14:05:27.000000000","message":"This is debugging output, but I guess it wouldn\u0027t hurt to leave it in.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3f92265ffef12fd478249993810e23da030f7671","unresolved":false,"context_lines":[{"line_number":20,"context_line":"export PYTHONOPTIMIZE\u003d1"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Run IPA"},{"line_number":23,"context_line":"date"},{"line_number":24,"context_line":"ironic-python-agent"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_d9102704","line":23,"in_reply_to":"dab17558_ad2281b7","updated":"2016-05-09 15:35:12.000000000","message":"It might be useful for debugging things in the future e.g. it lets us look at the logs and work out how long it takes to start IPA","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"}],"imagebuild/tinyipa/finalise-tinyipa.sh":[{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"9aa5f92082c2e03733427da95046c26d061b0b73","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"CHROOT_PATH\u003d\"/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin\""},{"line_number":13,"context_line":"CHROOT_CMD\u003d\"sudo chroot $FINALDIR /usr/bin/env -i PATH\u003d$CHROOT_PATH http_proxy\u003d$http_proxy https_proxy\u003d$https_proxy no_proxy\u003d$no_proxy PYTHONOPTIMIZE\u003d2\""},{"line_number":14,"context_line":"TC_CHROOT_CMD\u003d\"sudo chroot --userspec\u003d$TC:$STAFF $FINALDIR /usr/bin/env -i PATH\u003d$CHROOT_PATH http_proxy\u003d$http_proxy https_proxy\u003d$https_proxy no_proxy\u003d$no_proxy PYTHONOPTIMIZE\u003d2\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"echo \"Finalising tinyipa:\""},{"line_number":17,"context_line":""}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_907cf673","line":14,"updated":"2016-05-06 14:05:27.000000000","message":"Do we care about PYTHONOPTIMIZE here? TC_CHROOT_CMD doesn\u0027t seem to be used for any Python code.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3f92265ffef12fd478249993810e23da030f7671","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"CHROOT_PATH\u003d\"/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin\""},{"line_number":13,"context_line":"CHROOT_CMD\u003d\"sudo chroot $FINALDIR /usr/bin/env -i PATH\u003d$CHROOT_PATH http_proxy\u003d$http_proxy https_proxy\u003d$https_proxy no_proxy\u003d$no_proxy PYTHONOPTIMIZE\u003d2\""},{"line_number":14,"context_line":"TC_CHROOT_CMD\u003d\"sudo chroot --userspec\u003d$TC:$STAFF $FINALDIR /usr/bin/env -i PATH\u003d$CHROOT_PATH http_proxy\u003d$http_proxy https_proxy\u003d$https_proxy no_proxy\u003d$no_proxy PYTHONOPTIMIZE\u003d2\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"echo \"Finalising tinyipa:\""},{"line_number":17,"context_line":""}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_b9ce03b2","line":14,"in_reply_to":"dab17558_907cf673","updated":"2016-05-09 15:35:12.000000000","message":"Done","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"9aa5f92082c2e03733427da95046c26d061b0b73","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"# Precompile all python"},{"line_number":93,"context_line":"set +e"},{"line_number":94,"context_line":"$CHROOT_CMD /bin/bash -c \"python -m compileall /usr/local/lib/python2.7\""},{"line_number":95,"context_line":"set -e"},{"line_number":96,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.py\" -not -path \"*ironic_python_agent/api/config.py\" | sudo xargs rm -rf"},{"line_number":97,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.pyc\" | sudo xargs rm -rf"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_10e80610","line":94,"updated":"2016-05-06 14:05:27.000000000","message":"Since we\u0027re explicitly invoking python here, we could pass the -OO flag rather than setting PYTHONOPTIMIZE.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3f92265ffef12fd478249993810e23da030f7671","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"# Precompile all python"},{"line_number":93,"context_line":"set +e"},{"line_number":94,"context_line":"$CHROOT_CMD /bin/bash -c \"python -m compileall /usr/local/lib/python2.7\""},{"line_number":95,"context_line":"set -e"},{"line_number":96,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.py\" -not -path \"*ironic_python_agent/api/config.py\" | sudo xargs rm -rf"},{"line_number":97,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.pyc\" | sudo xargs rm -rf"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_19df4f6a","line":94,"in_reply_to":"dab17558_10e80610","updated":"2016-05-09 15:35:12.000000000","message":"Done","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"29ebf8ad613e22c2c0a462792d887d01fbe4cb6d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"set +e"},{"line_number":94,"context_line":"$CHROOT_CMD /bin/bash -c \"python -m compileall /usr/local/lib/python2.7\""},{"line_number":95,"context_line":"set -e"},{"line_number":96,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.py\" -not -path \"*ironic_python_agent/api/config.py\" | sudo xargs rm -rf"},{"line_number":97,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.pyc\" | sudo xargs rm -rf"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"# Allow an extension to be added to the generated files by specifying"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_2872d6ad","line":96,"updated":"2016-05-08 15:23:46.000000000","message":"looks like a dangerous thing to do, to be honest..","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"3f92265ffef12fd478249993810e23da030f7671","unresolved":false,"context_lines":[{"line_number":93,"context_line":"set +e"},{"line_number":94,"context_line":"$CHROOT_CMD /bin/bash -c \"python -m compileall /usr/local/lib/python2.7\""},{"line_number":95,"context_line":"set -e"},{"line_number":96,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.py\" -not -path \"*ironic_python_agent/api/config.py\" | sudo xargs rm -rf"},{"line_number":97,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.pyc\" | sudo xargs rm -rf"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"# Allow an extension to be added to the generated files by specifying"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_b9f723f4","line":96,"in_reply_to":"dab17558_20de613f","updated":"2016-05-09 15:35:12.000000000","message":"Removed force and recursive should make it much safer.","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"374564a216fbc57da03ee2efa389e5d498a30c23","unresolved":false,"context_lines":[{"line_number":93,"context_line":"set +e"},{"line_number":94,"context_line":"$CHROOT_CMD /bin/bash -c \"python -m compileall /usr/local/lib/python2.7\""},{"line_number":95,"context_line":"set -e"},{"line_number":96,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.py\" -not -path \"*ironic_python_agent/api/config.py\" | sudo xargs rm -rf"},{"line_number":97,"context_line":"find $FINALDIR/usr/local/lib/python2.7 -name \"*.pyc\" | sudo xargs rm -rf"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"# Allow an extension to be added to the generated files by specifying"}],"source_content_type":"text/x-sh","patch_set":1,"id":"dab17558_20de613f","line":96,"in_reply_to":"dab17558_2872d6ad","updated":"2016-05-09 10:06:21.000000000","message":"Possible slightly safer alternative:\n\nfor i in $(find -iname \"*.pyo\" -not -path \"*ironic_python_agent/api/config.pyo\"); do\n    rm -f $(basename $i .pyo).py\ndone","commit_id":"cd8973dc302eb5f78062bf1f8ca997996f4edd72"}]}
