mirror of https://github.com/sipwise/ngcpcfg.git
When runnning 'ngcpcfg build' (which is also executed when running 'ngcpcfg apply') we waste quite some time with loading the same YAML configuration files and merging them again and again. In a 'ngcpcfg build' run we don't have to re-load and merge those configuration files again and again (since they won't modify during a single run), instead just load+merge them *once* and re-use the result on all the following execution steps in the same run. Original: | # time ngcpcfg apply >/dev/null | ngcpcfg apply > /dev/null 149.01s user 9.49s system 96% cpu 2:43.57 total Reworked optimized runs: | # time ngcpcfg apply >/dev/null | ngcpcfg apply > /dev/null 81.25s user 8.62s system 95% cpu 1:34.17 total For debugging purposes you can execute 'ngcpcfg build' under NO_REUSE=1 to not use this feature, executing it under 'DEBUG=1' won't remove the so called reuse file which stores the merged configuration data. Thanks: Alexander Lutay for the initial patch and idea0.18
parent
f2e9a5e8e6
commit
335d53c95c
Loading…
Reference in new issue