switch_softwaretype: run software type buildout in same process
switch_softwaretype: run software type buildout in same process
This way buildout can reuse egg caches and it's a bit faster:
To run a simple instance buildout, from 2.837s it goes down to 1.875s. To run slapos node instance 10 times just after requesting an ERP5 instance, it goes from ~112s to 98s
before:
hyperfine "/srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/shared/python2.7/60364a13cc977dd5a894e0239ac889b9/bin/python2.7 /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/soft/c63ba7265399450b28f9ea6d5667a5e7/bin/buildout -U"
Benchmark #1: /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/shared/python2.7/60364a13cc977dd5a894e0239ac889b9/bin/python2.7 /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/soft/c63ba7265399450b28f9ea6d5667a5e7/bin/buildout -U
Time (mean ± σ): 2.837 s ± 0.275 s [User: 2.481 s, System: 0.285 s]
Range (min … max): 2.482 s … 3.222 s 10 runs
after:
hyperfine "/srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/shared/python2.7/60364a13cc977dd5a894e0239ac889b9/bin/python2.7 /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/soft/c63ba7265399450b28f9ea6d5667a5e7/bin/buildout -U"
Benchmark #1: /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/shared/python2.7/60364a13cc977dd5a894e0239ac889b9/bin/python2.7 /srv/slapgrid/slappart4/srv/slapos/inst/slappart0/tmp/soft/c63ba7265399450b28f9ea6d5667a5e7/bin/buildout -U
Time (mean ± σ): 1.875 s ± 0.067 s [User: 1.660 s, System: 0.148 s]
Range (min … max): 1.816 s … 2.038 s 10 runs