[bitbake-devel] [PATCH] data: fix performance regression

Chris Larson clarson at kergoth.com
Mon Apr 15 15:49:04 UTC 2013


On Mon, Apr 15, 2013 at 7:27 AM, Paul Eggleton <
paul.eggleton at linux.intel.com> wrote:

> BitBake commit 7c568132c54a21161de28907159f902462f1e2bb resulted in a
> fairly serious performance regression during parsing, almost doubling
> the time taken to do a full parse and almost certainly impacting
> performance during building. The expandKeys function is called
> frequently, and if we avoid using keys() and instead just use the normal
> variable lookup mechanism, performance is restored.
>
> Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
>

I would suggest using the existing __contains__ mechanism provided by
DataSmart.

    if newval in alterdata:

Should be sufficient, as MutableMapping from collections provides
__contains__ from Mapping, which in turn uses __getitem__.
-- 
Christopher Larson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20130415/ee0b28c4/attachment-0001.html>


More information about the bitbake-devel mailing list