The image startup seems to be the perfect candidate for RPythons profopt: - https://pypy.readthedocs.io/en/latest/config/translation.profopt.html - https://pypy.readthedocs.io/en/latest/config/translation.profoptargs.html