From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: liming.gao@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Mon, 16 Sep 2019 18:53:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 18:53:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,514,1559545200"; d="scan'208";a="270383907" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 16 Sep 2019 18:53:42 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 18:53:42 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 18:53:42 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0439.000; Tue, 17 Sep 2019 09:53:40 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Feng, Bob C" Subject: Re: [edk2-devel] [Patch 0/3] Clean BaseTools code for build performance Thread-Topic: [edk2-devel] [Patch 0/3] Clean BaseTools code for build performance Thread-Index: AQHVZ7tikY8Nq9FMFU63riWxCfGZaKcvJecA Date: Tue, 17 Sep 2019 01:53:39 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4F8D22@SHSMSX104.ccr.corp.intel.com> References: <20190910093705.34060-1-bob.c.feng@intel.com> In-Reply-To: <20190910093705.34060-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Bob Feng >Sent: Tuesday, September 10, 2019 5:37 PM >To: devel@edk2.groups.io >Subject: [edk2-devel] [Patch 0/3] Clean BaseTools code for build performa= nce > >REF: >1 https://bugzilla.tianocore.org/show_bug.cgi?id=3D2102 >2 https://bugzilla.tianocore.org/show_bug.cgi?id=3D2101 >3 https://bugzilla.tianocore.org/show_bug.cgi?id=3D2183 > >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 > > >