From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: bob.c.feng@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Tue, 10 Sep 2019 02:37:16 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 02:37:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="189290062" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 10 Sep 2019 02:37:15 -0700 From: "Bob Feng" To: devel@edk2.groups.io Subject: [Patch 0/3] Clean BaseTools code for build performance Date: Tue, 10 Sep 2019 17:37:05 +0800 Message-Id: <20190910093705.34060-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: 1 https://bugzilla.tianocore.org/show_bug.cgi?id=2102 2 https://bugzilla.tianocore.org/show_bug.cgi?id=2101 3 https://bugzilla.tianocore.org/show_bug.cgi?id=2183 By profiling build Ovmf with cProfile: 1. re.findall time reduced: after patch: 0.017 {method 'findall' of '_sre.SRE_Pattern' objects} original: 0.212 {method 'findall' of '_sre.SRE_Pattern' objects} 2. times of call of os.stat is reduced after patch: 33307 {built-in method nt.stat} orignial: 33774 {built-in method nt.stat} 3. rename call is removed. original: 2.165 {built-in method nt.rename} Feng, Bob C (3): BaseTools: Improve GetDependencyList function BaseTools: remove unnecessary calls of os.exist BaseTools:Remove the unnecessary operation of renaming a file. .../Source/Python/AutoGen/AutoGenWorker.py | 7 +- BaseTools/Source/Python/AutoGen/GenC.py | 97 ++++++++++--------- BaseTools/Source/Python/AutoGen/GenMake.py | 35 ++++--- .../Source/Python/AutoGen/PlatformAutoGen.py | 8 +- .../Source/Python/AutoGen/UniClassObject.py | 5 +- BaseTools/Source/Python/Common/Misc.py | 23 +---- 6 files changed, 82 insertions(+), 93 deletions(-) -- 2.20.1.windows.1