Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 1.02 KB

python-speedups.md

File metadata and controls

20 lines (13 loc) · 1.02 KB

python-speedups

Purpose

This class does try to improve the startup speed of the deployed python-interpreter by doing some tweaks. There is a blog-post which explains the background a little more in detail. You can expect between 10-25% speedup of startup time, without the need to change any code.

Usage

Just inherit the class into the image-recipe you want to tune

Configuration

The tuneup amount can be controlled by variable PYTHON_SPEEDUP_TARGETS. This variable is a space separated list which can contain the following items

  • compile_all - This forces a python-compiler run on the rootfs. Very useful when you have a readonly filesystem on your target
  • binary_tweak - This patches the python-CLI options. See blog-post for details
  • no_sitepackage - This disables the usage of side-packages by integrating them into the standard lib