From: "Feng, Bob C" <bob.c.feng@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>,
"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [Patch] BaseTools: Replace the sqlite database with list
Date: Thu, 8 Nov 2018 05:38:49 +0000 [thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D15FFFB3B4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <43c4bb22-41c4-fbf7-ff9d-e86bac0d2da7@Intel.com>
Hi Ray,
Right. No SQL dependency any more after this patch.
Thanks,
Bob
-----Original Message-----
From: Ni, Ruiyu
Sent: Thursday, November 8, 2018 1:37 PM
To: Feng, Bob C <bob.c.feng@intel.com>; edk2-devel@lists.01.org
Cc: Carsey, Jaben <jaben.carsey@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2] [Patch] BaseTools: Replace the sqlite database with list
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 <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> ---
Bob,
I am curious. After this patch, there is no SQL dependency in build tool?
--
Thanks,
Ray
next prev parent reply other threads:[~2018-11-08 5:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 3:15 [Patch] BaseTools: Replace the sqlite database with list BobCF
2018-11-08 5:36 ` Ni, Ruiyu
2018-11-08 5:38 ` Feng, Bob C [this message]
2018-11-08 16:47 ` Felix Polyudov
2018-11-09 6:29 ` Feng, Bob C
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08650203BA1BD64D8AD9B6D5D74A85D15FFFB3B4@SHSMSX101.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox