From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 407772118D95D for ; Wed, 7 Nov 2018 21:35:35 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 21:35:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="84849387" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.11]) ([10.239.9.11]) by fmsmga008.fm.intel.com with ESMTP; 07 Nov 2018 21:35:33 -0800 To: BobCF , edk2-devel@lists.01.org Cc: Jaben Carsey , Liming Gao References: <20181108031519.37720-1-bob.c.feng@intel.com> From: "Ni, Ruiyu" Message-ID: <43c4bb22-41c4-fbf7-ff9d-e86bac0d2da7@Intel.com> Date: Thu, 8 Nov 2018 13:36:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181108031519.37720-1-bob.c.feng@intel.com> Subject: Re: [Patch] BaseTools: Replace the sqlite database with list X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2018 05:35:35 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 11/8/2018 11:15 AM, BobCF wrote: > 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 python list to store the parser data > instead of using sqlite database. > > The replacement solution is as below: > > SQL insert: list.append() > SQL select: list comprehension. for example: > Select * from table where field = “something” > -> > [ item for item in table if item[3] == “something”] > > SQL update: python map function. for example: > Update table set field1=newvalue where filed2 = “something”. > -> map(lambda x: x[1] = newvalue, > [item for item in table if item[2] == “something”]) > > SQL delete: list comprehension. > > With this change, We can save the time of interpreting SQL statement > and the time of write database to file system > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: BobCF > Cc: Liming Gao > Cc: Jaben Carsey > --- Bob, I am curious. After this patch, there is no SQL dependency in build tool? -- Thanks, Ray