scripts: edtlib/extract_dts_includes.py: Speed up 2x+ with yaml.CLoader
Use the LibYAML-based yaml.CLoader if available instead of yaml.Loader, which is written in Python and slow. See https://pyyaml.org/wiki/PyYAMLDocumentation. This speeds up gen_defines.py from 0.2s to 0.07s on my system, for -DBOARD=hifive1. It should also make scripts/kconfig/kconfig.py faster, because it indirectly uses edtlib via scripts/kconfig/kconfigfunctions.py. yaml.CLoader seems to be available out of the box when installing with pip on Ubuntu at least. Helps with https://github.com/zephyrproject-rtos/zephyr/issues/20104 . Signed-off-by:Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Loading
Please sign in to comment