mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-16 01:26:30 +00:00
Create VM image .zip files in parallel using pigz (#4067)
When creating OVA image, the CPU is slacking at the end of the build because it is creating three ZIP archives, each one on a single CPU only. As we're creating only single-entry archives, we can use pigz to use all cores. The actual speedup on my machine (16C/32T) reflects the number of cores - it takes around 2 seconds instead of 1 minute.
This commit is contained in:
parent
5ebc3a0761
commit
834c51ca84
@ -38,6 +38,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openssh-client \
|
||||
patch \
|
||||
perl \
|
||||
pigz \
|
||||
python3 \
|
||||
python3-matplotlib \
|
||||
python-is-python3 \
|
||||
|
@ -100,5 +100,5 @@ function convert_disk_image_zip() {
|
||||
hdd_img="$(hassos_image_name "${hdd_ext}")"
|
||||
|
||||
rm -f "${hdd_img}.zip"
|
||||
zip -j -m -q -r "${hdd_img}.zip" "${hdd_img}"
|
||||
pigz -q -K -S ".zip" "${hdd_img}"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user