diff options
author | Ashraf Ali S <ashraf.ali.s@intel.com> | 2023-12-25 07:27:52 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-08 19:27:18 +0000 |
commit | e32b58ab5a12d37c82327f28376e7d12cccc8b3a (patch) | |
tree | 00e7b92859635d0ac36aca22d5102ecd233208cf /BaseTools | |
parent | 8f316e99ec8de9dea294f6751dd7457f9f1a828c (diff) | |
download | edk2-e32b58ab5a12d37c82327f28376e7d12cccc8b3a.tar.gz edk2-e32b58ab5a12d37c82327f28376e7d12cccc8b3a.tar.bz2 edk2-e32b58ab5a12d37c82327f28376e7d12cccc8b3a.zip |
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 <yuwei.chen@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py index 592d4824a4..dac81454a9 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:
|