From e32b58ab5a12d37c82327f28376e7d12cccc8b3a Mon Sep 17 00:00:00 2001 From: Ashraf Ali S Date: Mon, 25 Dec 2023 07:27:52 -0800 Subject: BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset Currently when the platform has many SKUs then allskuset will be having so many duplicate. and while parsing the allskuset will take longer time while assigning Pcd.SkuInfoList. This patch is to eliminate those duplicate entries to reduce the build time Cc: Yuwei Chen Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Amy Chan Cc: Sai Chaganty Signed-off-by: Ashraf Ali S Reviewed-by: Yuwei Chen Reviewed-by: Amy Chan Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'BaseTools') diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py index 592d482..dac8145 100644 --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py @@ -707,6 +707,8 @@ class PlatformAutoGen(AutoGen): self._DynamicPcdList.extend(list(OtherPcdArray)) self._DynamicPcdList.sort() allskuset = [(SkuName, Sku.SkuId) for pcd in self._DynamicPcdList for (SkuName, Sku) in pcd.SkuInfoList.items()] + # Remove duplicate sets in the list + allskuset = list(set(allskuset)) for pcd in self._DynamicPcdList: if len(pcd.SkuInfoList) == 1: for (SkuName, SkuId) in allskuset: -- cgit v1.1