* Uppercase overrides and parsing speed
@ 2008-02-23 19:04 Richard Purdie
2008-02-23 19:44 ` Koen Kooi
0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2008-02-23 19:04 UTC (permalink / raw)
To: openembedded-devel
Hi,
At OEDEM I mentioned that we might have some speed gain if bitbake could
more easily tell what constituted an override. All current overrides are
lower case and we don't have any in upper case. I tried having bitbake
ignore uppercase overrides (things like URI in SRC_URI) and saw a 2.5%
increase in parsing speed. A patch for bitbake is appended in case
anyone wishes to experiment.
Note it doesn't 100% disambiguate the situation since we have lowercase
variables.
Cheers,
Richard
Index: lib/bb/data_smart.py
===================================================================
--- lib/bb/data_smart.py (revision 1010)
+++ lib/bb/data_smart.py (working copy)
@@ -156,9 +156,10 @@
# more cookies for the cookie monster
if '_' in var:
override = var[var.rfind('_')+1:]
- if not self._seen_overrides.has_key(override):
- self._seen_overrides[override] = Set()
- self._seen_overrides[override].add( var )
+ if not override.isupper():
+ if not self._seen_overrides.has_key(override):
+ self._seen_overrides[override] = Set()
+ self._seen_overrides[override].add( var )
# setting var
self.dict[var]["content"] = value
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Uppercase overrides and parsing speed
2008-02-23 19:04 Uppercase overrides and parsing speed Richard Purdie
@ 2008-02-23 19:44 ` Koen Kooi
2008-02-23 20:26 ` Marcin Juszkiewicz
2008-02-23 20:34 ` Paul Sokolovsky
0 siblings, 2 replies; 9+ messages in thread
From: Koen Kooi @ 2008-02-23 19:44 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard Purdie schreef:
| Hi,
|
| At OEDEM I mentioned that we might have some speed gain if bitbake could
| more easily tell what constituted an override. All current overrides are
| lower case and we don't have any in upper case.
Didn't we also agree that variable names shouldn't include '_' at all?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFHwHeSMkyGM64RGpERAiHbAJ9uielvYaBj3SADU4wpHc6oXguG6wCeNxRX
6xwioyyoHnNqlTsOzZrdLPo=
=YF7a
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Uppercase overrides and parsing speed
2008-02-23 19:44 ` Koen Kooi
@ 2008-02-23 20:26 ` Marcin Juszkiewicz
2008-02-23 20:34 ` Paul Sokolovsky
1 sibling, 0 replies; 9+ messages in thread
From: Marcin Juszkiewicz @ 2008-02-23 20:26 UTC (permalink / raw)
To: openembedded-devel
Dnia Saturday, 23 of February 2008, Koen Kooi napisał:
> Richard Purdie schreef:
> | Hi,
> |
> | At OEDEM I mentioned that we might have some speed gain if bitbake
> | could more easily tell what constituted an override. All current
> | overrides are lower case and we don't have any in upper case.
>
> Didn't we also agree that variable names shouldn't include '_' at all?
We did, but this patch from Richard improves current situation without
doing search/replace on whole metadata and users configs.
--
JID: hrw-jabber.org
OpenEmbedded developer/consultant
Someday I'm gonna die but it won't be from boredom [Pink]
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Uppercase overrides and parsing speed
2008-02-23 19:44 ` Koen Kooi
2008-02-23 20:26 ` Marcin Juszkiewicz
@ 2008-02-23 20:34 ` Paul Sokolovsky
2008-02-23 21:40 ` Marcin Juszkiewicz
2008-02-23 21:57 ` Richard Purdie
1 sibling, 2 replies; 9+ messages in thread
From: Paul Sokolovsky @ 2008-02-23 20:34 UTC (permalink / raw)
To: openembedded-devel
Hello,
On Sat, 23 Feb 2008 20:44:19 +0100
Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Richard Purdie schreef:
> | Hi,
> |
> | At OEDEM I mentioned that we might have some speed gain if bitbake
> could | more easily tell what constituted an override. All current
> overrides are | lower case and we don't have any in upper case.
>
> Didn't we also agree that variable names shouldn't include '_' at all?
How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A' too? ;-)
Isn't there was a hint that using '_' as an override operator is funky?
>
> regards,
>
> Koen
[]
--
Best regards,
Paul mailto:pmiscml@gmail.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Uppercase overrides and parsing speed
2008-02-23 20:34 ` Paul Sokolovsky
@ 2008-02-23 21:40 ` Marcin Juszkiewicz
2008-02-23 21:53 ` Mike (mwester)
2008-02-23 22:00 ` Paul Sokolovsky
2008-02-23 21:57 ` Richard Purdie
1 sibling, 2 replies; 9+ messages in thread
From: Marcin Juszkiewicz @ 2008-02-23 21:40 UTC (permalink / raw)
To: openembedded-devel
Dnia Saturday, 23 of February 2008, Paul Sokolovsky napisał:
> Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
> > Didn't we also agree that variable names shouldn't include '_' at
> > all?
>
> How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A' too? ;-)
LETS-USE-IT-LIKE-THIS was one of suggestions.
--
JID: hrw-jabber.org
OpenEmbedded developer/consultant
Ludzie dzielą się na tych, którzy mają coś do powiedzenia
i na tych, którzy mówią bez przerwy. [Robert Frost]
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Uppercase overrides and parsing speed
2008-02-23 21:40 ` Marcin Juszkiewicz
@ 2008-02-23 21:53 ` Mike (mwester)
2008-02-23 22:00 ` Paul Sokolovsky
1 sibling, 0 replies; 9+ messages in thread
From: Mike (mwester) @ 2008-02-23 21:53 UTC (permalink / raw)
To: openembedded-devel
Marcin Juszkiewicz wrote:
> Dnia Saturday, 23 of February 2008, Paul Sokolovsky napisał:
>
>> Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
>>
>
>
>>> Didn't we also agree that variable names shouldn't include '_' at
>>> all?
>>>
>> How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A' too? ;-)
>>
>
> LETS-USE-IT-LIKE-THIS was one of suggestions.
>
>
Oh come on, now - you can't be serious. It's just not difficult enough
or arcane enough with any of those choices! We need to insist on this
syntax for variables:
LET\'S\ USE\ IT\ LIKE\ THIS
;-) :-P
Didn't there used to be some recommendation for a variable naming
convention that encoded the type into the name? Somehow all these
restrictions on the use of case and underscores reminds me of that
notation -- that idea seems to have faded away (thank goodness for
that, too), and I don't think we should let OE go there either. I'd
rather take a small performance hit instead of having to remember even
more rules about upper/lower case and other naming conventions. I vote
to leave well enough alone... JMO.
Mike (mwester)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Uppercase overrides and parsing speed
2008-02-23 21:40 ` Marcin Juszkiewicz
2008-02-23 21:53 ` Mike (mwester)
@ 2008-02-23 22:00 ` Paul Sokolovsky
2008-02-27 12:42 ` Michael 'Mickey' Lauer
1 sibling, 1 reply; 9+ messages in thread
From: Paul Sokolovsky @ 2008-02-23 22:00 UTC (permalink / raw)
To: openembedded-devel
Hello,
On Sat, 23 Feb 2008 22:40:59 +0100
Marcin Juszkiewicz <openembedded@haerwu.biz> wrote:
> Dnia Saturday, 23 of February 2008, Paul Sokolovsky napisał:
> > Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
>
> > > Didn't we also agree that variable names shouldn't include '_' at
> > > all?
> >
> > How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A'
> > too? ;-)
>
> LETS-USE-IT-LIKE-THIS was one of suggestions.
And still, rethinking the override marker is another choice, with a dot
being obvious candidate. Both syntaxes can be made coexist in
bitbake for some time, and transition made gradual.
>
> --
> JID: hrw-jabber.org
> OpenEmbedded developer/consultant
>
[]
--
Best regards,
Paul mailto:pmiscml@gmail.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Uppercase overrides and parsing speed
2008-02-23 22:00 ` Paul Sokolovsky
@ 2008-02-27 12:42 ` Michael 'Mickey' Lauer
0 siblings, 0 replies; 9+ messages in thread
From: Michael 'Mickey' Lauer @ 2008-02-27 12:42 UTC (permalink / raw)
To: openembedded-devel
On Saturday 23 February 2008 23:00:31 Paul Sokolovsky wrote:
> Hello,
>
> On Sat, 23 Feb 2008 22:40:59 +0100
>
> Marcin Juszkiewicz <openembedded@haerwu.biz> wrote:
> > Dnia Saturday, 23 of February 2008, Paul Sokolovsky napisał:
> > > Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
> > > > Didn't we also agree that variable names shouldn't include '_' at
> > > > all?
> > >
> > > How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A'
> > > too? ;-)
> >
> > LETS-USE-IT-LIKE-THIS was one of suggestions.
>
> And still, rethinking the override marker is another choice, with a dot
> being obvious candidate.
Agreed. I like that idea. Richard, is there an obvious reason why we didn't
consider this instead?
--
Dr. Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Uppercase overrides and parsing speed
2008-02-23 20:34 ` Paul Sokolovsky
2008-02-23 21:40 ` Marcin Juszkiewicz
@ 2008-02-23 21:57 ` Richard Purdie
1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2008-02-23 21:57 UTC (permalink / raw)
To: openembedded-devel
On Sat, 2008-02-23 at 22:34 +0200, Paul Sokolovsky wrote:
> On Sat, 23 Feb 2008 20:44:19 +0100 Koen Kooi <koen@dominion.kabel.utwente.nl> wrote:
> > Didn't we also agree that variable names shouldn't include '_' at all?
>
> How is that achievable? LETSUSEITLIKETHIS? Maybe exclude 'A' too? ;-)
> Isn't there was a hint that using '_' as an override operator is funky?
Changing the override operator involves a flag day and is painful,
changing the variable names isn't quite as invasive and it would be
possible to upgrade to over time.
FWIW, there isn't as much improvement as I'd hoped. I mentioned the
benchmark result since I had it and I thought it interesting...
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-02-27 12:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23 19:04 Uppercase overrides and parsing speed Richard Purdie
2008-02-23 19:44 ` Koen Kooi
2008-02-23 20:26 ` Marcin Juszkiewicz
2008-02-23 20:34 ` Paul Sokolovsky
2008-02-23 21:40 ` Marcin Juszkiewicz
2008-02-23 21:53 ` Mike (mwester)
2008-02-23 22:00 ` Paul Sokolovsky
2008-02-27 12:42 ` Michael 'Mickey' Lauer
2008-02-23 21:57 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.