From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/1] improve performance by immediate evaluation of HOST_ARCH
Date: Fri, 19 Dec 2025 10:09:21 +0100 [thread overview]
Message-ID: <20251219090922.279275-1-felix.moessbauer@siemens.com> (raw)
To determine the host architecture dpkg --print-architecture is
executed. This call is currently a lazy one, hence it is evaluated at
the location where HOST_ARCH is expanded. On multiconfig this led to
almost a million process invocations, slowing down the parsing.
By making this assignment immediate, it is only evaluated once (per
recipe), reducing the parse time by around 50% on some larger
multiconfigs. Prior to the change an extra weak assignemnt was used.
However, the HOST_ARCH is not expected to change anyways, hence the
replacement should be fine.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-global/base.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 471442e5..6c788adb 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -59,7 +59,8 @@ def get_deb_host_arch():
["dpkg", "--print-architecture"]
).decode('utf-8').strip()
return host_arch
-HOST_ARCH ??= "${@get_deb_host_arch()}"
+# immediately evaluate to avoid costly process call
+HOST_ARCH := "${@get_deb_host_arch()}"
HOST_DISTRO ??= "${DISTRO}"
# Inject the PREFERRED_PROVIDERs for multiarch variants. This corresponds to
--
2.51.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251219090922.279275-1-felix.moessbauer%40siemens.com.
reply other threads:[~2025-12-19 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251219090922.279275-1-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox