[poky] About the operator "??="

Tian, Kevin kevin.tian at intel.com
Wed Dec 8 03:35:00 PST 2010


>From: Richard Purdie
>Sent: Wednesday, December 08, 2010 6:30 PM
>
>Hi Dongxiao,
>
>On Wed, 2010-12-01 at 09:57 +0800, Xu, Dongxiao wrote:
>> Recently when investigating the file parsing speed, I found the
>> implementation of "??=" is another hot spot. This operator will not
>> apply the default assignment until the end of the parse, which is
>> different from "?=". According to current poky, the users for "??=" is
>> mostly the scm revisions stored in poky-default-revisions.inc.
>>
>> Currently the final assignment logic for "??=" is added in finalize(),
>> which costs about 20% parsing time.
>
>Can I take a look at the graph showing that? I'm a little surprised it
>takes 20% of the time, that is a rather scary amount!
>

I don't have the graph, but did do a simple test by printing the lazy value
list in finalize(). There're 166 items in total. Regarding finalize() may be
invoked multiple times for same recipe and we have over 700 recipes scanned
in a fresh run, it may contribute obvious overhead just like what Dongxiao
previously optimized for distro tracking fields.

I think we could remove the lazy key from the list after grabbing it as the
default value, and is now testing it...

Thanks
Kevin



More information about the poky mailing list