extract-utils: Extract A/B OTA partitions in parallel
Before:
real 1m32.730s
user 1m20.466s
sys 0m11.764s
After:
real 1m10.794s
user 1m21.270s
sys 0m11.592s
Change-Id: Idd4bc94ccb00d4e80ba1aa2efb86f1f29c5667ae
diff --git a/extract_utils.sh b/extract_utils.sh
index ef25afc..0d3d154 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -1565,7 +1565,11 @@
# Extract A/B OTA
if [ -a "$DUMPDIR"/payload.bin ]; then
- "$OTA_EXTRACTOR" --payload "$DUMPDIR"/payload.bin --output_dir "$DUMPDIR" --partitions "system","odm","product","system_ext","vendor" 2>&1
+ for PARTITION in "system" "odm" "product" "system_ext" "vendor"
+ do
+ "$OTA_EXTRACTOR" --payload "$DUMPDIR"/payload.bin --output_dir "$DUMPDIR" --partitions "$PARTITION" &2>&1
+ done
+ wait
fi
for PARTITION in "system" "odm" "product" "system_ext" "vendor"