Poky Project Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2][RFC] bitbake: optimize file parsing speed
@ 2010-12-13 14:52 Dongxiao Xu
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Dongxiao Xu @ 2010-12-13 14:52 UTC (permalink / raw)
  To: poky

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(-)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-13 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 14:52 [PATCH 0/2][RFC] bitbake: optimize file parsing speed Dongxiao Xu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox