All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@linux.intel.com>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: Chris Larson <clarson@kergoth.com>,
	"poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: About the operator "??="
Date: Fri, 10 Dec 2010 23:42:01 +0000	[thread overview]
Message-ID: <1292024521.14420.99.camel@rex> (raw)
In-Reply-To: <D5AB6E638E5A3E4B8F4406B113A5A19A314F313A@shsmsx501.ccr.corp.intel.com>

On Thu, 2010-12-09 at 22:44 +0800, Xu, Dongxiao wrote:
> I made the following patch (setVarFlag.patch) to move everything in
> setVar to setVarFlag, please help to review it.
> 
> Please note one place that I modified, see the indent of
> "self._seen_overrides[override].add( var )", I thought it was a bug in
> original code.

No, its not. Its making sure [override] exists before trying to add var
to it. It could also be:

if override not in self._seen_overrides:
    self._seen_overrides[override] = set(var)
else:
    self._seen_overrides[override].add( var )

> After adding this, the "two lines" in original "??=" optimization
> patch are no longer needed.
> 
> +            if bb.data.getVarFlag(key, "content", data) is None:
> +                bb.data.setVar(key, None, data)
> 
> I rerun "time bitbake -p" with the two patches (see below, one is
> setVarFlag.patch, another is the "??=" optimization patch)
> The result is:
> 
> real    0m27.049s
> user    0m26.340s
> sys     0m0.440s
> 
> The parsing time is a bit longer ( < 1 sec) than without the following
> "setVarFlag.patch".

Patches look good to me other than the above. I also talked to Chris on
irc on #oe earlier today and we agreed this is a good move for setVar
bringing both into line although the whole way the datastore works could
still be better.

Could you send these patches through a pull request please and lets get
them merged.

Cheers,

Richard





  reply	other threads:[~2010-12-10 23:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  1:57 About the operator "??=" Xu, Dongxiao
2010-12-08 10:30 ` Richard Purdie
2010-12-08 11:35   ` Tian, Kevin
2010-12-08 11:59     ` Xu, Dongxiao
2010-12-08 14:37       ` Richard Purdie
2010-12-09  3:32         ` Xu, Dongxiao
2010-12-09  4:57           ` Tian, Kevin
2010-12-09  7:59             ` Xu, Dongxiao
2010-12-09 11:24               ` Richard Purdie
2010-12-09 12:13                 ` Xu, Dongxiao
2010-12-09 12:45                   ` Richard Purdie
2010-12-09 14:44                     ` Xu, Dongxiao
2010-12-10 23:42                       ` Richard Purdie [this message]
2010-12-10 23:58                         ` Chris Larson
2010-12-13 16:24                           ` Scott Garman
2010-12-11  2:48                         ` Xu, Dongxiao
2010-12-08 12:49     ` Tian, Kevin
2010-12-08 13:02       ` Xu, Dongxiao
  -- strict thread matches above, loose matches on Subject: below --
2010-12-08  3:00 Xu, Dongxiao

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-all 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=1292024521.14420.99.camel@rex \
    --to=rpurdie@linux.intel.com \
    --cc=clarson@kergoth.com \
    --cc=dongxiao.xu@intel.com \
    --cc=poky@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.