* [PATCH 1/1] improve performance by immediate evaluation of HOST_ARCH
@ 2025-12-19 9:09 'Felix Moessbauer' via isar-users
0 siblings, 0 replies; only message in thread
From: 'Felix Moessbauer' via isar-users @ 2025-12-19 9:09 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-19 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-19 9:09 [PATCH 1/1] improve performance by immediate evaluation of HOST_ARCH 'Felix Moessbauer' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox