]> code.ossystems Code Review - openembedded-core.git/commit
bitbake/data_smart: Improve the way lazyassignment works
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Feb 2011 11:48:01 +0000 (11:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Feb 2011 11:48:01 +0000 (11:48 +0000)
commit6ea24f04cd635295d826f03d9c7d8a08cc1d5b31
tree2832426819f702aa2a1f9d21c35a4a3d6dd22f6b
parent707132c60a84cdcf50da056c68f2da7402d3b2e8
bitbake/data_smart: Improve the way lazyassignment works

Currently, if a variable has been set with ??= and the code looks it up
before the data finalisation phase, no value is found. This is causes
serious problems for anonymous python functions which manipulate data, or
for the fetcher revision handling code where revisions can be set with
??=.

There is also a significant performance implication for processing lazy
assignment in finalise.

Moving the check for a default value into getVarFlag addresses both
the timing issue and the performace. This change gives a 7% real time
performance improvement to parsing the Poky metadata. The cost of the
check at this point is minimal since we have all the data flags available.

This should also fix Yocto bug 752.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/data_smart.py
bitbake/lib/bb/parse/ast.py