* [PATCH] ptest: d.keys() is slow, use a list instead
@ 2014-01-14 11:43 Richard Purdie
2014-01-14 11:56 ` Otavio Salvador
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2014-01-14 11:43 UTC (permalink / raw)
To: openembedded-core
Unfortunately d.keys is extremely slow. Using a list in this case should be
fine since the addtask lines are immediately above the code and aren't
going to change often.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index e5bbb89..caf7101 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -55,6 +55,6 @@ python () {
# Remove all '*ptest_base' tasks when ptest is not enabled
if not(d.getVar('PTEST_ENABLED', True) == "1"):
- for i in filter(lambda k: d.getVarFlag(k, "task") and k.endswith("ptest_base"), d.keys()):
+ for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
bb.build.deltask(i, d)
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ptest: d.keys() is slow, use a list instead
2014-01-14 11:43 [PATCH] ptest: d.keys() is slow, use a list instead Richard Purdie
@ 2014-01-14 11:56 ` Otavio Salvador
0 siblings, 0 replies; 2+ messages in thread
From: Otavio Salvador @ 2014-01-14 11:56 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 610 bytes --]
On Tue, Jan 14, 2014 at 9:43 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> Unfortunately d.keys is extremely slow. Using a list in this case should be
> fine since the addtask lines are immediately above the code and aren't
> going to change often.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
A code comment stating it needs to be update would be good.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
[-- Attachment #2: Type: text/html, Size: 1257 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-14 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 11:43 [PATCH] ptest: d.keys() is slow, use a list instead Richard Purdie
2014-01-14 11:56 ` Otavio Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox