I found that bitbake has BBFILES_DYNAMIC for such dynamic-layers,
I will send a V2.

// Robert

On 01/16/2018 04:54 PM, Robert Yang wrote:
The previous code add all BBFILE_COLLECTIONS/recipes*/*/*.bbappend to BBFILES,
which causes the parsing very slow when there are many layers, e.g., I have 87
layers:

* Before:
$ rm -fr tmp-glibc/ cache; time bitbake -p
real    0m45.173s
user    0m0.560s
sys     0m0.060s

* After:
$ rm -fr tmp-glibc/ cache; time bitbake -p
real    0m25.542s
user    0m0.572s
sys     0m0.040s

It cost 20s which isn't worth (The host has 128 threads, it should cost more
time on less power host), only set BBFILES according to known layers (currently:
meta-python, networking-layer and virtualization-layer) can fix the problem.

Signed-off-by: Robert Yang <[email protected]>
---
  conf/layer.conf | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index f773dc3..0ad766c 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -8,7 +8,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
  # Let us add layer-specific bbappends which are only applied when that
  # layer is included in our configuration
  BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
-               for layer in BBFILE_COLLECTIONS.split())}"
+               for layer in set(BBFILE_COLLECTIONS.split()) & \
+               set(['meta-python', 'networking-layer', 
'virtualization-layer']))}"
BBFILE_COLLECTIONS += "selinux"
  BBFILE_PATTERN_selinux = "^${LAYERDIR}/"

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to