Poky Project Discussions
 help / color / mirror / Atom feed
From: Dongxiao Xu <dongxiao.xu@intel.com>
To: poky@yoctoproject.org
Subject: [PATCH 0/2][RFC] bitbake: optimize file parsing speed
Date: Mon, 13 Dec 2010 22:52:51 +0800	[thread overview]
Message-ID: <cover.1292251971.git.dongxiao.xu@intel.com> (raw)

Hi Richard,

This RFC/pull request aims to speed up the bb file parsing speed. 
Please help to review it, thanks!

We observed that the ??= operator costs a lot of cycles when parsing bb
files, this patchset implement the ??= in getVar() function. If the
normal getVar returns None, it will check the defaultval flag and
return its value.

Besides, 0001 patch also fixes a bug that if foo_OVERA[bar] = "x" and
foo is never set as a variable directly, the override is never expanded.

I slightly modified 0001 patch compared with the previous discussion
version. If simply copy the setVar logic into setVarFlag, I found
that variable "do_install_append_virtclass-native" will both exist in
self._special_values and self._seen_overrides, this is because when
setting "content" for "do_install_append_virtclass-native", the variable
will be recorded in self._special_values, and when setting "func" flag
for "do_install_append_virtclass-native", the variable will be recorded
in self._seen_overrides. This version of patch could fix the issue.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: dxu4/parsefile
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/parsefile

Thanks,
    Dongxiao Xu <dongxiao.xu@intel.com>
---


Dongxiao Xu (2):
  bitbake: Make setVar a special case of setVarFlag
  bitbake: Change the way to implement ??= operator

 bitbake/lib/bb/data_smart.py |   63 ++++++++++++++++++++---------------------
 bitbake/lib/bb/parse/ast.py  |    7 ----
 2 files changed, 31 insertions(+), 39 deletions(-)



             reply	other threads:[~2010-12-13 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 14:52 Dongxiao Xu [this message]
2010-12-13 14:50 ` [PATCH 1/2] bitbake: Make setVar a special case of setVarFlag Dongxiao Xu
2010-12-13 14:51 ` [PATCH 2/2] bitbake: Change the way to implement ??= operator Dongxiao Xu

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=cover.1292251971.git.dongxiao.xu@intel.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox