summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/InfBuildData.py
diff options
context:
space:
mode:
authorBobCF <bob.c.feng@intel.com>2018-11-08 18:16:25 +0800
committerBobCF <bob.c.feng@intel.com>2018-12-07 10:30:21 +0800
commit4e375707392e4f9085e2d2342e41aee9d4df2b0a (patch)
tree35f6608ddc57cb9a46ddd5f4496b6c8bdfb1bdf3 /BaseTools/Source/Python/Workspace/InfBuildData.py
parent2f818ed0fb57d98985d151781a2ce9b8683129ee (diff)
downloadedk2-4e375707392e4f9085e2d2342e41aee9d4df2b0a.tar.gz
edk2-4e375707392e4f9085e2d2342e41aee9d4df2b0a.tar.bz2
edk2-4e375707392e4f9085e2d2342e41aee9d4df2b0a.zip
BaseTools: Optimize string concatenation
https://bugzilla.tianocore.org/show_bug.cgi?id=1288 This patch is one of build tool performance improvement series patches. This patch is going to use join function instead of string += string2 statement. Current code use string += string2 in a loop to combine a string. while creating a string list in a loop and using "".join(stringlist) after the loop will be much faster. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: BobCF <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/InfBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index d10cfea40d..99bbecfd1f 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -614,7 +614,9 @@ class InfBuildData(ModuleBuildClassObject):
Instance = Record[1]
if Instance:
Instance = NormPath(Instance, self._Macros)
- RetVal[Lib] = Instance
+ RetVal[Lib] = Instance
+ else:
+ RetVal[Lib] = None
return RetVal
## Retrieve library names (for Edk.x style of modules)