[edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset

Ashraf Ali S posted 1 patch 4 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++
1 file changed, 2 insertions(+)
[edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset
Posted by Ashraf Ali S 4 months ago
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 assing Pcd.SkuInfoList.
This patch is to eliminate those duplicate entires 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>
---
 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++
 1 file changed, 2 insertions(+)

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:
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112884): https://edk2.groups.io/g/devel/message/112884
Mute This Topic: https://groups.io/mt/103360241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset
Posted by Yuwei Chen 3 months, 3 weeks ago
Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>

> -----Original Message-----
> From: S, Ashraf Ali <ashraf.ali.s@intel.com>
> Sent: Monday, December 25, 2023 11:28 PM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali <ashraf.ali.s@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>; Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chan,
> Amy <amy.chan@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: [PATCH] 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
> assing Pcd.SkuInfoList.
> This patch is to eliminate those duplicate entires 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>
> ---
>  BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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:
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113334): https://edk2.groups.io/g/devel/message/113334
Mute This Topic: https://groups.io/mt/103360241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset
Posted by Michael D Kinney 3 months ago
Hi Christine,

I did not see this merged yet.

Is this change also in edk2-basetools repo?  I do not see it there.

I thought the process was to do changed in edk2-basetools repo first where 
there are a large set of CI checks and then make the same change in the
edk2 repo.

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yuwei
> Chen
> Sent: Sunday, January 7, 2024 4:29 PM
> To: S, Ashraf Ali <ashraf.ali.s@intel.com>; devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chan,
> Amy <amy.chan@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: Re: [edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of
> SkuName and SkuId from allskuset
> 
> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
> 
> > -----Original Message-----
> > From: S, Ashraf Ali <ashraf.ali.s@intel.com>
> > Sent: Monday, December 25, 2023 11:28 PM
> > To: devel@edk2.groups.io
> > Cc: S, Ashraf Ali <ashraf.ali.s@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>; Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> > <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chan,
> > Amy <amy.chan@intel.com>; Chaganty, Rangasai V
> > <rangasai.v.chaganty@intel.com>
> > Subject: [PATCH] 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
> > assing Pcd.SkuInfoList.
> > This patch is to eliminate those duplicate entires 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>
> > ---
> >  BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > 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:
> > --
> > 2.39.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114245): https://edk2.groups.io/g/devel/message/114245
Mute This Topic: https://groups.io/mt/103360241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset
Posted by Chan, Amy 3 months, 3 weeks ago
Reviewed-by: Amy Chan <amy.chan@intel.com>

> -----Original Message-----
> From: Chen, Christine <yuwei.chen@intel.com>
> Sent: Monday, January 8, 2024 8:29 AM
> To: S, Ashraf Ali <ashraf.ali.s@intel.com>; devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chan,
> Amy <amy.chan@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: RE: [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId
> from allskuset
> 
> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
> 
> > -----Original Message-----
> > From: S, Ashraf Ali <ashraf.ali.s@intel.com>
> > Sent: Monday, December 25, 2023 11:28 PM
> > To: devel@edk2.groups.io
> > Cc: S, Ashraf Ali <ashraf.ali.s@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>; Rebecca Cran <rebecca@bsdio.com>; Gao,
> Liming
> > <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chan,
> > Amy <amy.chan@intel.com>; Chaganty, Rangasai V
> > <rangasai.v.chaganty@intel.com>
> > Subject: [PATCH] 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
> > assing Pcd.SkuInfoList.
> > This patch is to eliminate those duplicate entires 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>
> > ---
> >  BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > 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:
> > --
> > 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113451): https://edk2.groups.io/g/devel/message/113451
Mute This Topic: https://groups.io/mt/103360241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-