Merge "parallelize add_partition_calls" am: 96b51b54b6
Original change: https://android-review.googlesource.com/c/platform/build/+/2585397 Change-Id: I58e1b516a5109eaed483af1c8b9979f838e0b96f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
d5dc0c17fe
1 changed files with 5 additions and 3 deletions
|
@ -65,7 +65,7 @@ import verity_utils
|
|||
import ota_metadata_pb2
|
||||
import rangelib
|
||||
import sparse_img
|
||||
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from apex_utils import GetApexInfoFromTargetFiles
|
||||
from common import ZipDelete, PARTITIONS_WITH_CARE_MAP, ExternalError, RunAndCheckOutput, IsSparseImage, MakeTempFile, ZipWrite
|
||||
|
||||
|
@ -1083,8 +1083,10 @@ def AddImagesToTargetFiles(filename):
|
|||
("system_dlkm", has_system_dlkm, AddSystemDlkm, []),
|
||||
("system_other", has_system_other, AddSystemOther, []),
|
||||
)
|
||||
for call in add_partition_calls:
|
||||
add_partition(*call)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=len(add_partition_calls)) as executor:
|
||||
for future in [executor.submit(add_partition, *call) for call in add_partition_calls]:
|
||||
future.result()
|
||||
|
||||
AddApexInfo(output_zip)
|
||||
|
||||
|
|
Loading…
Reference in a new issue