Add a cache for the value of skip ModuleAutoGen
process flag. This cache can improve build performance.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
def CanSkipbyHash(self):\r
if GlobalData.gUseHashCache:\r
return not self.GenModuleHash()\r
def CanSkipbyHash(self):\r
if GlobalData.gUseHashCache:\r
return not self.GenModuleHash()\r
\r
## Decide whether we can skip the ModuleAutoGen process\r
# If any source file is newer than the module than we cannot skip\r
#\r
def CanSkip(self):\r
\r
## Decide whether we can skip the ModuleAutoGen process\r
# If any source file is newer than the module than we cannot skip\r
#\r
def CanSkip(self):\r
+ if self.MetaFile in GlobalData.gSikpAutoGenCache:\r
+ return True\r
if not os.path.exists(self.GetTimeStampPath()):\r
return False\r
#last creation time of the module\r
if not os.path.exists(self.GetTimeStampPath()):\r
return False\r
#last creation time of the module\r
ModuleAutoGen.TimeDict[source] = os.stat(source)[8]\r
if ModuleAutoGen.TimeDict[source] > DstTimeStamp:\r
return False\r
ModuleAutoGen.TimeDict[source] = os.stat(source)[8]\r
if ModuleAutoGen.TimeDict[source] > DstTimeStamp:\r
return False\r
+ GlobalData.gSikpAutoGenCache.add(self.MetaFile)\r
return True\r
\r
def GetTimeStampPath(self):\r
return True\r
\r
def GetTimeStampPath(self):\r
gPackageHash = {}\r
gModuleHash = {}\r
gEnableGenfdsMultiThread = False\r
gPackageHash = {}\r
gModuleHash = {}\r
gEnableGenfdsMultiThread = False\r
+gSikpAutoGenCache = set()\r