From 05834e7c9d096586bee902c24762e66e340e333d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 7 Oct 2021 14:04:05 +0200 Subject: Memoize the result of spack.platforms.host() (#26573) --- lib/spack/spack/platforms/_functions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/platforms/_functions.py b/lib/spack/spack/platforms/_functions.py index 17dfbb5d67..c1301c47ff 100644 --- a/lib/spack/spack/platforms/_functions.py +++ b/lib/spack/spack/platforms/_functions.py @@ -13,6 +13,7 @@ from .test import Test platforms = [Cray, Darwin, Linux, Test] +@llnl.util.lang.memoized def _host(): """Detect and return the platform for this machine or None if detection fails.""" for platform_cls in sorted(platforms, key=lambda plt: plt.priority): -- cgit v1.2.3-70-g09d2